Risolto


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

circa 3 anni fa

Risposto
How to graph log function?
y = linspace(0, 1e-3, 100); x = 14/log(2)*log(y./sqrt(1e-6-y.^2)) + 37.119; plot(y, x) xlabel('y'); ylabel('x');

circa 3 anni fa | 0

| accettato

Risolto


Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

circa 3 anni fa

Risolto


Pi Digit Probability
Assume that the next digit of pi constant is determined by the historical digit distribution. What is the probability of next di...

circa 3 anni fa

Risolto


Pi Estimate 1
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

circa 3 anni fa

Risolto


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

circa 3 anni fa

Risolto


radius of a spherical planet
You just measured its surface area, that is the input.

circa 3 anni fa

Risolto


Find the number of days in a given year
Given a year number (eg. 2000) as input, find how many days are there in the given year.

circa 3 anni fa

Problema


Find the number of days in a given year
Given a year number (eg. 2000) as input, find how many days are there in the given year.

circa 3 anni fa | 1 | 29 risolutori

Risolto


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

circa 3 anni fa

Risolto


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

circa 3 anni fa

Risolto


Create a vector
Create a vector from 0 to n by intervals of 2.

circa 3 anni fa

Risolto


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

circa 3 anni fa

Risolto


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

circa 3 anni fa

Risolto


Find max
Find the maximum value of a given vector or matrix.

circa 3 anni fa

Risolto


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

circa 3 anni fa

Risolto


Inner product of two vectors
Find the inner product of two vectors.

circa 3 anni fa

Risposto
Animation on Matlab Graph
clear clc img = imread('halcon milenario.png'); figure; himg = imagesc([0 1], [0, 1], img); xlim([0 10]); ylim([-3 4]); ...

circa 3 anni fa | 1

Risposto
Find the index of first and last non zero in column
x = [0 1 0 4; 1 2 0 1; 0 1 2 0; 0 0 0 0] [m, n] = size(x); ind = zeros(1, n); for i=1:n xlast = find(x(:, i), 1, 'last...

circa 3 anni fa | 0

| accettato

Risposto
How to create a sequence of datetime for given set of datetime series (with duplicate dates)?
You can use the following code to find the row index of the required time. dstr =[... '05-01-2010 15:05:00' '06-01-20...

circa 3 anni fa | 0

Risposto
How to obtain a triangle pair which have a shared edge from Delaunay Triangulation
After you obtain DT, you can use the following command to get the ID of the triangles in DT.ConnectivityList. P = rand([5 2]); ...

circa 3 anni fa | 0

| accettato

Risposto
Subscript indices must either be real positive integers or logicals?
You define max as a variable max=500; However you intend to use max as a function in: U(i,:)= max(lb,U(i,:)); Since max is d...

circa 3 anni fa | 0

| accettato

Risposto
How to generate a Gaussian random complex vector of N elements
% Assume that real and imaginary parts are independent % 1/sqrt(2) makes the variaonce to be 1 x = 1/sqrt(2)*(rand(N, 1) +1i*r...

circa 3 anni fa | 2

Risolto


Sum the Infinite Series
Given that 0 < x and x < 2*pi where x is in radians, write a function [c,s] = infinite_series(x); that returns with the...

circa 3 anni fa

Risolto


Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

circa 3 anni fa

Risolto


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

circa 3 anni fa

Risolto


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

circa 3 anni fa

Risolto


Find relatively common elements in matrix rows
You want to find all elements that exist in greater than 50% of the rows in the matrix. For example, given A = 1 2 3 5 ...

circa 3 anni fa

Risolto


Counting in Finnish
Sort a vector of single digit whole numbers alphabetically by their name, in Finnish. See the Wikipedia page for <http://en.wik...

circa 3 anni fa

Risolto


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

circa 3 anni fa

Carica altro