Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists.
x = [2 6 4 9 -10 3 1 5 -10];
So
...
mehr als ein Jahr vor
Gelöst
Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below.
Example
x = [2 3 6 9]
then y should be
[...
mehr als ein Jahr vor
Gelöst
Find last zero for each column
Given a numeric array of arbitrary size, return the row index of the last zero for each column. If a column contains all nonzero...
mehr als ein Jahr vor
Gelöst
Count consecutive 0's in between values of 1
So you have some vector that contains 1's and 0's, and the goal is to return a vector that gives the number of 0's between each ...