Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
A = [1 2 4];
B = [-1 1 3];
fun = @plus;
y_correct = [0 3 7];
assert(isequal(ABfun(A,B,fun),y_correct))
y =
0 3 7
|
2 | Pass |
A = [1 2 4];
B = [-1 1 3];
fun = @minus;
y_correct = [2 1 1];
assert(isequal(ABfun(A,B,fun),y_correct))
y =
2 1 1
|
3 | Pass |
A = [2 3 4];
B = 2;
fun = @power;
y_correct = [4 9 16];
assert(isequal(ABfun(A,B,fun),y_correct))
B =
2 2 2
y =
4 9 16
|
4 | Pass |
A = [1 0 1];
B = [0 1 0];
fun = @times;
y_correct = [0 0 0];
assert(isequal(ABfun(A,B,fun),y_correct))
y =
0 0 0
|
2197 Solvers
2539 Solvers
Given a matrix, return the last eigen value
175 Solvers
412 Solvers
Find out sum of all elements of given Matrix
349 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!