Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if
x = [1 2...
etwa 12 Jahre vor
Gelöst
Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...
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...
etwa 12 Jahre vor
Gelöst
Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...
etwa 12 Jahre vor
Gelöst
Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...
etwa 12 Jahre vor
Gelöst
Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1.
Example...
etwa 12 Jahre vor
Gelöst
Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B.
So if
A = [1 2 3; 4 5 6];
and ...