Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN;
output -> matrix(p*m), the same matrix where we deleted the enti...
22 days ago
Solved
Column norms of a matrix
Given a matrix M, return a vector y such that for each k
y(k)=norm(M(:,k))
(y(k) is the Euclidean norm of the k-th col...
22 days ago
Solved
Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...
26 days ago
Solved
Maximum value in a matrix
Find the maximum value in the given matrix.
For example, if
A = [1 2 3; 4 7 8; 0 9 1];
then the answer is 9.
26 days ago
Solved
An asteroid and a spacecraft
🚀 Imagine a non-relativistic simple situation.
Assume positions p0, p1, p2, and p3 are three dimensional Cartesian ...
26 days ago
Solved
Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because
6 = 1 + 2 + 3
which can be displayed ...
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...
26 days ago
Solved
N-Dimensional Array Slice
Given an N-dimensional array, _A_, an index, _I_, and a dimension, _d_, return the _I_ th elements of _A_ in the _d_ dimension.
...