Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = [10 20 30;40 50 60];
y_correct = [10; 40;20; 50; 30; 60;]
assert(isequal(Mat2Vector(x),y_correct))
y_correct =
10
40
20
50
30
60
ans =
10
40
20
50
30
60
|
2 | Pass |
%%
x=[-2 -4 -6; -1 -3 -5; -10 -20 0]
y_correct = [-2; -1;-10; -4; -3;-20; -6;-5;0]
assert(isequal(Mat2Vector(x),y_correct))
x =
-2 -4 -6
-1 -3 -5
-10 -20 0
y_correct =
-2
-1
-10
-4
-3
-20
-6
-5
0
ans =
-2
-1
-10
-4
-3
-20
-6
-5
0
|
3 | Pass |
%%
x=[1 2 3 4 5; 6 7 8 9 10];
x(:,:,2) = [10 20 30 40 50;60 70 80 90 100];
y_correct = [1;6;2;7;3;8;4;9;5;10;10;60;20;70;30;80;40;90;50;100]
assert(isequal(Mat2Vector(x),y_correct))
y_correct =
1
6
2
7
3
8
4
9
5
10
10
60
20
70
30
80
40
90
50
100
ans =
1
6
2
7
3
8
4
9
5
10
10
60
20
70
30
80
40
90
50
100
|
2401 Solvers
Make one big string out of two smaller strings
1148 Solvers
Make a random, non-repeating vector.
2795 Solvers
216 Solvers
Find out value of sine given by degree.
231 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!