Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = [1; 2];
y = [1 2];
out_matrix = [1 2; 2 4];
assert(isequal(your_fcn_name(x,y),out_matrix))
out_matrix =
1 2
2 4
|
2 | Pass |
x = (1:3)';
y = 1:3;
out_matrix = [1,2,3;2,4,6;3,6,9];
assert(isequal(your_fcn_name(x,y),out_matrix))
out_matrix =
1 2 3
2 4 6
3 6 9
|
3 | Pass |
x = ones(10,1);
y = ones(1,10);
out_matrix = ones(10);
assert(isequal(your_fcn_name(x,y),out_matrix))
out_matrix =
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
|
4 | Pass |
x = ones(1,10);
y = ones(10,1);
out_matrix = 10;
assert(isequal(your_fcn_name(x,y),out_matrix))
out_matrix =
10
|
5 | Pass |
x = ones(3,1);
y = [7 6 8];
out_matrix = repmat(y,[3,1]);
assert(isequal(your_fcn_name(x,y),out_matrix))
out_matrix =
7 6 8
7 6 8
7 6 8
|
6 | Pass |
x = [1;0;1;0;1];
y = [0,1,0,1,0];
out_matrix = [0,1,0,1,0;0,0,0,0,0;0,1,0,1,0;0,0,0,0,0;0,1,0,1,0];
assert(isequal(your_fcn_name(x,y),out_matrix))
out_matrix =
0 1 0 1 0
0 0 0 0 0
0 1 0 1 0
0 0 0 0 0
0 1 0 1 0
|
533 Solvers
Matlab Basics - Absolute Value
272 Solvers
Sum of the Multiplication of Vectors
152 Solvers
Finding an element in a vector
89 Solvers
Calculate the number of elements in a matrix.
53 Solvers