This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 1;
y_correct = [1 1];
assert(isequal(your_fcn_name(x),y_correct))
m =
1
n =
1
x =
1
1
y =
1 1
z =
0
z =
0 1 1
B =
1 1
|
2 | Pass |
x = [0 -1 1 0 0 0 1 2];
y_correct = [0 0 -1 -1 1 1 0 0 0 0 0 0 1 1 2 2];
assert(isequal(your_fcn_name(x),y_correct))
m =
1
n =
8
x =
0 -1 1 0 0 0 1 2
0 -1 1 0 0 0 1 2
y =
0 0
-1 -1
1 1
0 0
0 0
0 0
1 1
2 2
z =
0
z =
0 0 0
z =
0 0 0 -1 -1
z =
0 0 0 -1 -1 1 1
z =
0 0 0 -1 -1 1 1 0 0
z =
0 0 0 -1 -1 1 1 0 0 0 0
z =
0 0 0 -1 -1 1 1 0 0 0 0 0 0
z =
0 0 0 -1 -1 1 1 0 0 0 0 0 0 1 1
z =
0 0 0 -1 -1 1 1 0 0 0 0 0 0 1 1 2 2
B =
0 0 -1 -1 1 1 0 0 0 0 0 0 1 1 2 2
|
358 Solvers
Matlab Basics - Convert a row vector to a column vector
419 Solvers
139 Solvers
708 Solvers
Create a vector with n repeated values of a number x (★★)
60 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!