Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
A = magic(5);
y_correct = [10 12 19 21 3;
11 18 25 2 9;
17 24 1 8 15;
23 5 7 14 16;
4 6 13 20 22];
assert(isequal(your_fcn_name(A),y_correct))
ans =
10 12 19 21 3
11 18 25 2 9
17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
|
2 | Pass |
A = 1:5;
y_correct = A;
assert(isequal(your_fcn_name(A),y_correct))
ans =
1 2 3 4 5
|
3 | Pass |
A = [1:4; 9:12; 13:16; 5:8];
y_correct = reshape((1:16),[4,4])';
assert(isequal(your_fcn_name(A),y_correct))
ans =
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
|
4 | Pass |
A = (1:10)';
y_correct = A;
ind = rand(10,1); [~,indA] = sort(ind); A = A(indA);
assert(isequal(your_fcn_name(A),y_correct))
ans =
1
2
3
4
5
6
7
8
9
10
|
5 | Pass |
A = [3:7; 10:-1:6; -4:0; 2:-1:-2];
y_correct = flipud(A);
assert(isequal(your_fcn_name(A),y_correct))
ans =
2 1 0 -1 -2
-4 -3 -2 -1 0
10 9 8 7 6
3 4 5 6 7
|
Replace NaNs with the number that appears to its left in the row.
1710 Solvers
Remove the polynomials that have positive real elements of their roots.
447 Solvers
1045 Solvers
How many trades represent all the profit?
460 Solvers
200 Solvers