Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
X = [4800; 5100];
Y = [7.5247; 7.2851]*1e-1;
x = 5000;
y = Poly_Interp(X,Y,x)
y_correct = 0.73650;
assert(abs(y-y_correct)<1e-4)
y =
0.7365
|
2 | Pass |
X = [4800; 5100];
Y = [7.5247; 7.2851];
x = 5000;
y_correct = 7.3650;
c_correct = 1.6350e+05;
[y,c] = Poly_Interp(X,Y,x)
assert(abs(y-y_correct)<1e-4)
assert(norm(c-c_correct)<1e2)
y =
7.3650
c =
1.6350e+05
|
3 | Pass |
X = [300, 400, 500];
Y = [0.616, 0.525, 0.457];
x = 350;
[y,c] = Poly_Interp(X,Y,x)
y_correct = 0.567625;
c_correct = [5.8932e+06];
assert(abs(y-y_correct)<1e-4)
assert(norm(c-c_correct)<1e2)
y =
0.5676
c =
5.8932e+06
|
4 | Pass |
X = [1, 4 6];
Y = log(X);
x = 2;
[y,c] = Poly_Interp(X,Y,x)
y_correct = 0.5658;
c_correct = 93.9107;
assert(abs(y-y_correct)<1e-4)
assert(norm(c-c_correct)<1e-2)
y =
0.5658
c =
93.9107
|
1092 Solvers
Back to basics 6 - Column Vector
908 Solvers
725 Solvers
Implement simple rotation cypher
943 Solvers
219 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!