Unit Matrix
Given n, you should return an n-by-n unit matrix.
Example:
If input is n=2 then
A = [ 1 0
0 1 ]
If input ...
10 years ago
Solved
Add a block to a model
Produce the following signal:
<<http://blogs.mathworks.com/images/seth/cody/add-block-eqn.png>>
In this case, the slope of...
10 years ago
Solved
Produce a cosine wave
Produce the following signal:
<<http://blogs.mathworks.com/images/seth/cody/cosine-eqn.png>>
10 years ago
Solved
Connect blocks in a model
Connect the blocks in the model to produce the following signal:
<<http://blogs.mathworks.com/images/seth/cody/connect-blocks...
10 years ago
Solved
Return unique values without sorting
If the input vector A is [42 1 1],
the output value B must be the unique values [42 1]
The *values of B are in the s...
Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times.
Examples :
n=2, A=[1 2 3] -> [1 1 2 2 3 3]
n=0...
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...