Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
x1 = [11 10 2];
x2 = [4 4 3];
y_correct = zeros(3,3,3);
y_correct(:,:,1) = [44 44 33; 40 40 30; 8 8 6];
y_correct(:,:,2) = [704 704 297; 640 640 270; 128 128 54];
y_correct(:,:,3) = [96.8 96.8 72.6; 80 80 60; 3.2 3.2 2.4];
assert(sum(sum(sum(abs(your_fcn_name(x1,x2)-y_correct))))<1e-3)
|
2 | Fail |
x1 = [1 2 3];
x2 = [1 5 9];
y_correct = zeros(3,3,3);
y_correct(:,:,1) = [1 5 9; 2 10 18; 3 15 27];
y_correct(:,:,2) = [1 125 729; 2 250 1458; 3 375 2187];
y_correct(:,:,3) = [0.2 1.0 1.8; 0.8 4.0 7.2; 1.8 9.0 16.2];
assert(sum(sum(sum(abs(your_fcn_name(x1,x2)-y_correct))))<1e-3)
|
3 | Fail |
x1 = [-4 7 9];
x2 = [3 2 11];
y_correct = zeros(3,3,3);
y_correct(:,:,1) = [-12 -8 -44; 21 14 77; 27 18 99];
y_correct(:,:,2) = [-108 -32 -5324; 189 56 9317; 243 72 11979];
y_correct(:,:,3) = [9.6 6.4 35.2; 29.4 19.6 107.8; 48.6 32.4 178.2];
assert(sum(sum(sum(abs(your_fcn_name(x1,x2)-y_correct))))<1e-3)
|
54193 Solvers
Getting the row and column location from a matrix
236 Solvers
The sum of the numbers in the vector
426 Solvers
400 Solvers
5458 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!