This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x=[ 1.000000000000 2.000000000000 3.000000000000 4.000000000000 5.000000000000 6.000000000000 7.000000000000 8.000000000000 9.000000000000 10.000000000000 ];
y=sol(x);
yref=-5.000000000000
assert(abs(y-yref)<1e-6);
yref =
-5
|
2 | Pass |
x=[ 2.000000000000 4.000000000000 8.000000000000 16.000000000000 32.000000000000 64.000000000000 128.000000000000 256.000000000000 512.000000000000 1024.000000000000 ];
y=sol(x);
yref=-682.000000000000
assert(abs(y-yref)<1e-6);
yref =
-682
|
3 | Pass |
x=[ 1.000000000000 4.000000000000 9.000000000000 16.000000000000 25.000000000000 36.000000000000 49.000000000000 64.000000000000 81.000000000000 100.000000000000 ];
y=sol(x);
yref=-55.000000000000
assert(abs(y-yref)<1e-6);
yref =
-55
|
4 | Pass |
x=[ 1.000000000000 8.000000000000 27.000000000000 64.000000000000 125.000000000000 216.000000000000 343.000000000000 512.000000000000 729.000000000000 1000.000000000000 ];
y=sol(x);
yref=-575.000000000000
assert(abs(y-yref)<1e-6);
yref =
-575
|
5 | Pass |
x=[ 1.000000000000 0.500000000000 0.333333333333 0.250000000000 0.200000000000 0.166666666667 0.142857142857 0.125000000000 0.111111111111 0.100000000000 ];
y=sol(x);
yref=0.645634920635
assert(abs(y-yref)<1e-6);
yref =
0.6456
|
6 | Pass |
x=[ 0.243132468125 -0.107772980466 0.155477890178 -0.328813312188 0.206046088020 -0.468167153623 -0.223077015039 -0.453828609369 -0.402868218764 0.323457828327 ];
y=sol(x);
yref=1.013835439837
assert(abs(y-yref)<1e-6);
yref =
1.0138
|
15296 Solvers
Find the largest value in the 3D matrix
1056 Solvers
299 Solvers
519 Solvers
1141 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!