Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
a = 3;
alpha = 1 : 1 : 10;
beta = 2 : 2 : 20;
b = 6;
out = interpolator(a, alpha, beta);
assert(isequal(out(:), b))
i =
1 2
j =
4 5 6 7 8 9 10
x =
2
x =
2 4
y =
4
y =
4 8
vb =
6
|
2 | Pass |
a = 3.5;
alpha = 1 : 1 : 10;
beta = 2 : 2 : 20;
b = 7;
out = interpolator(a, alpha, beta);
assert(isequal(out(:), b))
i =
1 2 3
j =
4 5 6 7 8 9 10
x =
3
x =
3 4
y =
6
y =
6 8
vb =
7
|
3 | Pass |
a = 3;
alpha = [0 1 5 6 7 10];
beta = [2 3 5 7 9 100];
b = 4;
out = interpolator(a, alpha, beta);
assert(isequal(out(:), b))
i =
1 2
j =
3 4 5 6
x =
1
x =
1 5
y =
3
y =
3 5
vb =
4
|
Back to basics 21 - Matrix replicating
1052 Solvers
Remove the two elements next to NaN value
411 Solvers
5013 Solvers
5124 Solvers
511 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!