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...
8 years ago
Solved
Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes.
---
Logical indexing works like this.
thresh = 4...
8 years ago
Solved
Produce a sine wave
Produce a sine wave with amplitude 3:
<<http://blogs.mathworks.com/images/seth/cody/sine-eqn.png>>
8 years ago
Solved
Produce a cosine wave
Produce the following signal:
<<http://blogs.mathworks.com/images/seth/cody/cosine-eqn.png>>
8 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...
8 years ago
Solved
First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...
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]
...