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))
|
2 | Pass |
A = 1:5;
y_correct = A;
assert(isequal(your_fcn_name(A),y_correct))
|
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))
|
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))
|
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))
|
54227 Solvers
2500 Solvers
"Low : High - Low : High - Turn around " -- Create a subindices vector
320 Solvers
Flip the vector from right to left
2666 Solvers
Matlab Basics - y as a function of x
339 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!