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 same order a...
約2年 前
解決済み
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 i...
約2年 前
解決済み
Getting the indices from a matrix
Inspired by Problem 645.
Getting the indices from a matrix.
Given a matrix A (or a vector), return the indices (always in row...
約2年 前
解決済み
calculate PI without using pi function
There are many methods to get the pi(Ratio of circumference to diameter).
You should get pi without using the pi function in M...
約2年 前
解決済み
Another colon problem
This is simple problem based on problems 555, 801, 1118, etc.
Create an index vector from two input vectors.
Example:
...