A résolu


Create a square matrix with given conditions
Create a square matrix, M, which should be populated as follows: M = [ n^2 n * (n-1) n * (n-2) ... n * 2 n * ...

environ 7 ans il y a

A résolu


Weighted average
Compute the weighted average Y, of the vector A, given the weight vector W. The weighted average is the sum of the dot produc...

environ 7 ans il y a

A résolu


intervals
Write a function that takes an interval from a to b, and divides it into 6 parts.

environ 7 ans il y a

A résolu


Create a figure and plot data
Given two data vectors (x,y), open a new figure and plot the data. Return the figure handle.

environ 7 ans il y a

A résolu


Function Iterator
Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...

environ 7 ans il y a

A résolu


Adding Numbers
Add the input numbers to the original.

environ 7 ans il y a

A résolu


Magnitude of a vector
Given a vector x, what is its magnitude?

environ 7 ans il y a

A résolu


Find the coefficient of a number in scientifc notation
Given a non-negative real number N, find the coefficient C and the exponent E of its scientific notation (N = C 10^E). Note that...

environ 7 ans il y a

A résolu


Calculate feeling temperature before climbing a mountain
I sometimes climb a mountain. As is well known, when the altitude becomes 100 (m) higher, the temperature lowers by 0.6 degrees...

environ 7 ans il y a

A résolu


Refresh your system of equations
Given square matrix, and solution vector, find the values of the variables Example: xyz = [1 -1 2; 0 2 5; 4 0 -3]; //x-y+2...

environ 7 ans il y a

A résolu


Delete the column with all 0 !
Delete the column with all 0 data in a matrix(x). e.g. input x = 1 0 0 4 5 0 7 0 ...

environ 7 ans il y a

A résolu


Triple function composition
Given three functions f,g and h, create the composed function y=f(g(h)). Example f = @(x) x+1 g = @(x) x/2 h = @(x) ...

environ 7 ans il y a

A résolu


Tridiagonal matrix
Given vectors u and v, make a tri-diagonal symmetric matrix such that u is in the main diagonal and v is below and above diagona...

environ 7 ans il y a

A résolu


Calculate the eigenvalues of A.
Calculate the sum of the eigenvalues of A. If it's odd return cubed else return 54.

environ 7 ans il y a

A résolu


'Determine if array of numbers is odd'
Return true if the input single number is odd. If the input is a vector, it will return a vector or array of logical values indi...

environ 7 ans il y a

A résolu


Find cosine between two given vectors u and v.
Find cosine between two given vectors u and v. Example u = [5 2 0 5 3 0]; v = [3 2 5 1 ...

environ 7 ans il y a

A résolu


Perimeter of a quadrilateral
There are four cars starting at a point. The first car points north, the second one points east, the third one points south, an...

environ 7 ans il y a

A résolu


Calculate sin(x) without sin(x)
Calculate y = sin(x) x = 0 -> y= 0 without the use of sin(x) or cos(x)

environ 7 ans il y a

A résolu


Calculate the sum of elements of n*n Hilbert matrix.
Calculate the sum of elements of n*n Hilbert matrix. For example, for n=5: HilbertMatrix = [1.0000 0.5000 0.333...

environ 7 ans il y a

A résolu


Multiply two polynomials p and q given in in vector representation.
Multiply two polynomials p and q given in vector representation. Example p=[-2 0 1 -1 3 2] q=[1 0 -1 2 ...

environ 7 ans il y a

A résolu


Chicken Race
2 chickens, Pete and Fred, compete in a 100 meter race. Pete runs at a velocity of vp meter/second and Fred is slower, running ...

environ 7 ans il y a

A résolu


Deriving a function using the difference quotient
Write a function that evaluates the derivative of a function in a given point using the well-know formula of the difference quot...

environ 7 ans il y a

A résolu


Funny problems
Generate the following vector: if n=1 then q=1; elseif n=2 then q=[2 2 1]; elseif n=3 then q=[3 3 3 2 2 1]; ... end

environ 7 ans il y a

A résolu


Find the next square number
Given one or more integers n, find the next integer that is a square, for each of them. Example 1: n = 1; out = 4; ...

environ 7 ans il y a

A résolu


Calculate the values of a polynomial.
Calculate the values of a polynomial.Input parameter p - vector of polynomial coefficients, x - matrix of the argument values. ...

environ 7 ans il y a

A résolu


Determinant without using det()
Given a square matrix A, compute the <http://en.wikipedia.org/wiki/Determinant determinant> of A. Note that you may not use t...

environ 7 ans il y a

A résolu


Differential equations I
Given a function handle |f| an initial condition |y0| and a final time |tf|, solve numerically the differential equation dy...

environ 7 ans il y a

A résolu


Approximation of Pi (vector inputs)
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...

environ 7 ans il y a

A résolu


persistant sum
There will be 9 tests for this problem. In each test you will be provided with 2 integers n=[n1,n2], where n2 is equal to t...

environ 7 ans il y a

A résolu


Increase monotonically
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

environ 7 ans il y a

Charger plus