Cody

# Problem 42763. Fill the Matrix - 2

Solution 1687568

Submitted on 6 Dec 2018
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
x = [1:8]'; n = 4; y_correct = [ 0 0 0 0 1; 0.2 0 0 0 2; 0.44 0.2 0 0 3; 0.728 0.44 0.2 0 4; 1.07360 0.728 0.44 0.2 5; 1.48832 1.07360 0.728 0.44 6; 1.945984 1.48832 1.07360 0.728 7; 2.4471808 1.945984 1.48832 1.07360 8]; y = fillMatrix2(x,n); assert(all(abs(y(:)-y_correct(:))<1e-4));

st = 0 0 0 0 0 0 0 0 st = 0.4000 0 0 0 0 0 0 0 0 y = 0 0 0 0 1.0000 0 0 0 0.4000 0 0 0 0 0 0 0 0 0 0 0 3.0000 0 0 0 0 0 0 0 4.0000 0 0 0 0 0 0 0 5.0000 0 0 0 0 0 0 0 6.0000 0 0 0 0 0 0 0 7.0000 0 0 0 0 0 0 0 8.0000 0 0 0 st = 0.3750 0.4000 0 0 0 0 0 0 0 0 y = 0 0 0 0 1.0000 0 0 0 0.4000 0 0 0 0 0 0 0 0.3750 0.4000 0 0 0 0 0 0 0 0 0 0 4.0000 0 0 0 0 0 0 0 5.0000 0 0 0 0 0 0 0 6.0000 0 0 0 0 0 0 0 7.0000 0 0 0 0 0 0 0 8.0000 0 0 0 st = 0.5000 0.3750 0.4000 0 0 0 0 0 0 0 0 y = 0 0 0 0 1.0000 0 0 0 0.4000 0 0 0 0 0 0 0 0.3750 0.4000 0 0 0 0 0 0 0.5000 0.3750 0.4000 0 0 0 0 0 0 0 0 0 5.0000 0 0 0 0 0 0 0 6.0000 0 0 0 0 0 0 0 7.0000 0 0 0 0 0 0 0 8.0000 0 0 0 st = 0.6250 0.5000 0.3750 0.4000 0 0 0 0 0 0 0 0 y = 0 0 0 0 1.0000 0 0 0 0.4000 0 0 0 0 0 0 0 0.3750 0.4000 0 0 0 0 0 0 0.5000 0.3750 0.4000 0 0 0 0 0 0.6250 0.5000 0.3750 0.4000 0 0 0 0 0 0 0 0 6.0000 0 0 0 0 0 0 0 7.0000 0 0 0 0 0 0 0 8.0000 0 0 0 st = 0.7500 0.6250 0.5000 0.3750 0.4000 0 0 0 0 0 0 0 0 y = 0 0 0 0 1.0000 0 0 0 0.4000 0 0 0 0 0 0 0 0.3750 0.4000 0 0 0 0 0 0 0.5000 0.3750 0.4000 0 0 0 0 0 0.6250 0.5000 0.3750 0.4000 0 0 0 0 0.7500 0.6250 0.5000 0.3750 0.4000 0 0 0 0 0 0 0 7.0000 0 0 0 0 0 0 0 8.0000 0 0 0 st = 0.8750 0.7500 0.6250 0.5000 0.3750 0.4000 0 0 0 0 0 0 0 0 y = 0 0 0 0 1.0000 0 0 0 0.4000 0 0 0 0 0 0 0 0.3750 0.4000 0 0 0 0 0 0 0.5000 0.3750 0.4000 0 0 0 0 0 0.6250 0.5000 0.3750 0.4000 0 0 0 0 0.7500 0.6250 0.5000 0.3750 0.4000 0 0 0 0.8750 0.7500 0.6250 0.5000 0.3750 0.4000 0 0 0 0 0 0 8.0000 0 0 0 st = 1.0000 0.8750 0.7500 0.6250 0.5000 0.3750 0.4000 0 0 0 0 0 0 0 0 y = 0 0 0 0 1.0000 0 0 0 0.4000 0 0 0 0 0 0 0 0.3750 0.4000 0 0 0 0 0 0 0.5000 0.3750 0.4000 0 0 0 0 0 0.6250 0.5000 0.3750 0.4000 0 0 0 0 0.7500 0.6250 0.5000 0.3750 0.4000 0 0 0 0.8750 0.7500 0.6250 0.5000 0.3750 0.4000 0 0 1.0000 0.8750 0.7500 0.6250 0.5000 0.3750 0.4000 0

Matrix dimensions must agree. Error in Test1 (line 14) assert(all(abs(y(:)-y_correct(:))<1e-4));

2   Fail
x = [0.9649; 0.1576; 0.9706; 0.9572; 0.4854; 0.8003; 0.1419; 0.4218; 0.9157]; n = 10; y_correct = [0 0 0 0 0 0 0 0 0 0 0.9649;0.0877 0 0 0 0 0 0 0 0 0 0.1576;0.0223 0.0877 0 0 0 0 0 0 0 0 0.9706;0.0982 0.0223 0.0877 0 0 0 0 0 0 0 0.9572;0.106 0.0982 0.0223 0.0877 0 0 0 0 0 0 0.4854;0.0727 0.106 0.0982 0.0223 0.0877 0 0 0 0 0 0.8003;0.1079 0.0727 0.106 0.0982 0.0223 0.0877 0 0 0 0 0.1419;0.0579 0.1079 0.0727 0.106 0.0982 0.0223 0.0877 0 0 0 0.4218;0.0886 0.0579 0.1079 0.0727 0.106 0.0982 0.0223 0.0877 0 0 0.9157;]; y = fillMatrix2(x,n); assert(all(abs(y(:)-y_correct(:))<1e-4));

st = 0 0 0 0 0 0 0 0 0 st = 0.0143 0 0 0 0 0 0 0 0 0 y = 0 0 0 0 0 0 0 0 0 0 0.9649 0.0143 0 0 0 0 0 0 0 0 0 0.1576 0 0 0 0 0 0 0 0 0 0 0.9706 0 0 0 0 0 0 0 0 0 0 0.9572 0 0 0 0 0 0 0 0 0 0 0.4854 0 0 0 0 0 0 0 0 0 0 0.8003 0 0 0 0 0 0 0 0 0 0 0.1419 0 0 0 0 0 0 0 0 0 0 0.4218 0 0 0 0 0 0 0 0 0 0 0.9157 st = 0.0882 0.0143 0 0 0 0 0 0 0 0 0 y = 0 0 0 0 0 0 0 0 0 0 0.9649 0.0143 0 0 0 0 0 0 0 0 0 0.1576 0.0882 0.0143 0 0 0 0 0 0 0 0 0.9706 0 0 0 0 0 0 0 0 0 0 0.9572 0 0 0 0 0 0 0 0 0 0 0.4854 0 0 0 0 0 0 0 0 0 0 0.8003 0 0 0 0 0 0 0 0 0 0 0.1419 0 0 0 0 0 0 0 0 0 0 0.4218 0 0 0 0 0 0 0 0 0 0 0.9157 st = 0.0870 0.0882 0.0143 0 0 0 0 0 0 0 0 0 y = 0 0 0 0 0 0 0 0 0 0 0.9649 0.0143 0 0 0 0 0 0 0 0 0 0.1576 0.0882 0.0143 0 0 0 0 0 0 0 0 0.9706 0.0870 0.0882 0.0143 0 0 0 0 0 0 0 0.9572 0 0 0 0 0 0 0 0 0 0 0.4854 0 0 0 0 0 0 0 0 0 0 0.8003 0 0 0 0 0 0 0 0 0 0 0.1419 0 0 0 0 0 0 0 0 0 0 0.4218 0 0 0 0 0 0 0 0 0 0 0.9157 st = 0.0441 0.0870 0.0882 0.0143 0 0 0 0 0 0 0 0 0 y = 0 0 0 0 0 0 0 0 0 0 0.9649 0.0143 0 0 0 0 0 0 0 0 0 0.1576 0.0882 0.0143 0 0 0 0 0 0 0 0 0.9706 0.0870 0.0882 0.0143 0 0 0 0 0 0 0 0.9572 0.0441 0.0870 0.0882 0.0143 0 0 0 0 0 0 0.4854 0 0 0 0 0 0 0 0 0 0 0.8003 0 0 0 0 0 0 0 0 0 0 0.1419 0 0 0 0 0 0 0 0 0 0 0.4218 0 0 0 0 0 0 0 0 0 0 0.9157 st = 0.0728 0.0441 0.0870 0.0882 0.0143 0 0 0 0 0 0 0 0 0 y = 0 0 0 0 0 0 0 0 0 0 0.9649 0.0143 0 0 0 0 0 0 0 0 0 0.1576 0.0882 0.0143 0 0 0 0 0 0 0 0 0.9706 0.0870 0.0882 0.0143 0 0 0 0 0 0 0 0.9572 0.0441 0.0870 0.0882 0.0143 0 0 0 0 0 0 0.4854 0.0728 0.0441 0.0870 0.0882 0.0143 0 0 0 0 0 0.8003 0 0 0 0 0 0 0 0 0 0 0.1419 0 0 0 0 0 0 0 0 0 0 0.4218 0 0 0 0 0 0 0 0 0 0 0.9157 st = 0.0129 0.0728 0.0441 0.0870 0.0882 0.0143 0 0 0 0 0 0 0 0 0 y = 0 0 0 0 0 0 0 0 0 0 0.9649 0.0143 0 0 0 0 0 0 0 0 0 0.1576 0.0882 0.0143 0 0 0 0 0 0 0 0 0.9706 0.0870 0.0882 0.0143 0 0 0 0 0 0 0 0.9572 0.0441 0.0870 0.0882 0.0143 0 0 0 0 0 0 0.4854 0.0728 0.0441 0.0870 0.0882 0.0143 0 0 0 0 0 0.8003 0.0129 0.0728 0.0441 0.0870 0.0882 0.0143 0 0 0 0 0.1419 0 0 0 0 0 0 0 0 0 0 0.4218 0 0 0 0 0 0 0 0 0 0 0.9157 st = 0.0383 0.0129 0.0728 0.0441 0.0870 0.0882 0.0143 0 0 0 0 0 0 0 0 0 y = 0 0 0 0 0 0 0 0 0 0 0.9649 0.0143 0 0 0 0 0 0 0 0 0 0.1576 0.0882 0.0143 0 0 0 0 0 0 0 0 0.9706 0.0870 0.0882 0.0143 0 0 0 0 0 0 0 0.9572 0.0441 0.0870 0.0882 0.0143 0 0 0 0 0 0 0.4854 0.0728 0.0441 0.0870 0.0882 0.0143 0 0 0 0 0 0.8003 0.0129 0.0728 0.0441 0.0870 0.0882 0.0143 0 0 0 0 0.1419 0.0383 0.0129 0.0728 0.0441 0.0870 0.0882 0.0143 0 0 0 0.4218 0 0 0 0 0 0 0 0 0 0 0.9157 st = 0.0832 0.0383 0.0129 0.0728 0.0441 0.0870 0.0882 0.0143 0 0 0 0 0 0 0 0 0 y = 0 0 0 0 0 0 0 0 0 0 0.9649 0.0143 0 0 0 0 0 0 0 0 0 0.1576 0.0882 0.0143 0 0 0 0 0 0 0 0 0.9706 0.0870 0.0882 0.0143 0 0 0 0 0 0 0 0.9572 0.0441 0.0870 0.0882 0.0143 0 0 0 0 0 0 0.4854 0.0728 0.0441 0.0870 0.0882 0.0143 0 0 0 0 0 0.8003 0.0129 0.0728 0.0441 0.0870 0.0882 0.0143 0 0 0 0 0.1419 0.0383 0.0129 0.0728 0.0441 0.0870 0.0882 0.0143 0 0 0 0.4218 0.0832 0.0383 0.0129 0.0728 0.0441 0.0870 0.0882 0.0143 0 0 0.9157

Assertion failed.

3   Fail
x = [1:20]'; n = 0; y_correct = [1:20]'; y = fillMatrix2(x,n); assert(all(abs(y(:)-y_correct(:))<1e-4));

st = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 st = 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y = 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 st = Columns 1 through 17 0.1500 2.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 18 through 22 0 0 0 0 0 y = Columns 1 through 17 1.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1500 2.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 11.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 16.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 17.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 18.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 19.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 20.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 18 through 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 st = Columns 1 through 17 0.2000 0.1500 2.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 18 through 23 0 0 0 0 0 0 y = Columns 1 through 17 1.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1500 2.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2000 0.1500 2.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 11.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 16.0000 0 0 0 ...

Matrix dimensions must agree. Error in Test3 (line 6) assert(all(abs(y(:)-y_correct(:))<1e-4));

4   Fail
x = [0.7922;-0.9595;-0.6557;0.03570;0.8491;0.9340;0.6787;-0.7577;0.7431;0.3922;-0.6555;0.1712;0.7060;-0.03180;0.2769;-0.04620;0.09710;0.8235;-0.6948;0.3171]; n = 4; y_correct = [0 0 0 0 0.7922;0.1584 0 0 0 -0.9595;-0.1602 0.1584 0 0 -0.6557;-0.1315 -0.1602 0.1584 0 0.0357;-0.0195 -0.1315 -0.1602 0.1584 0.8491;0.1393 -0.0195 -0.1315 -0.1602 0.934;0.1524 0.1393 -0.0195 -0.1315 0.6787;0.1639 0.1524 0.1393 -0.0195 -0.7577;-0.0643 0.1639 0.1524 0.1393 0.7431;0.2269 -0.0643 0.1639 0.1524 0.3922;0.1742 0.2269 -0.0643 0.1639 -0.6555;-0.0310 0.1742 0.2269 -0.0643 0.1712;0.0954 -0.0310 0.1742 0.2269 0.706;0.2343 0.0954 -0.0310 0.1742 -0.0318;0.0882 0.2343 0.0954 -0.0310 0.2769;0.1328 0.0882 0.2343 0.0954 -0.0462;0.1009 0.1328 0.0882 0.2343 0.0971;0.1307 0.1009 0.1328 0.0882 0.8235;0.2552 0.1307 0.1009 0.1328 -0.6948;-0.0151 0.2552 0.1307 0.1009 0.3171]; y = fillMatrix2(x,n); assert(all(abs(y(:)-y_correct(:))<1e-4));

st = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 st = Columns 1 through 17 -0.1919 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 18 through 21 0 0 0 0 y = Columns 1 through 17 0 0 0 0 0.7922 0 0 0 0 0 0 0 0 0 0 0 0 -0.1919 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.6557 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0357 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.8491 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.9340 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6787 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.7577 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7431 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3922 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.6555 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1712 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7060 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.0318 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2769 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.0462 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0971 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.8235 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.6948 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3171 0 0 0 0 0 0 0 0 0 0 0 0 Columns 18 through 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 st = Columns 1 through 17 -0.0328 -0.1919 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 18 through 22 0 0 0 0 0 y = Columns 1 through 17 0 0 0 0 0.7922 0 0 0 0 0 0 0 0 0 0 0 0 -0.1919 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.0328 -0.1919 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0357 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.8491 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.9340 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6787 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.7577 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7431 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3922 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.6555 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1712 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7060 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.0318 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2769 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.0462 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0971 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.8235 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.6948 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3171 0 0 0 0 0 0 0 0 0 0 0 0 Columns 18 through 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 st = Columns 1 through 17 0.0018 -0.0328 -0.1919 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 18 through 23 0 0 0 0 0 0 y = Columns 1 through 17 0 0 0 0 0.7922 0 0 0 0 0 0 0 0 0 0 0 0 -0.1919 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.0328 -0.1919 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0018 -0.0328 -0.1919 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.8491 0 0 0 0 0 0 0 ...

Matrix dimensions must agree. Error in Test4 (line 7) assert(all(abs(y(:)-y_correct(:))<1e-4));