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 = 3;
coefficients = [-19, 7, -4, 6];
y_correct = 128;
assert(isequal(your_fcn_name(x,coefficients),y_correct))
|
2 | Pass |
%%
x = 21;
coefficients = [5, -4, 7, -2];
y_correct = -15514;
assert(isequal(your_fcn_name(x,coefficients),y_correct))
|
3 | Pass |
%%
x = [11:15];
a = [-10:-6];
b = [6:2:14];
c = [-14:2:-6];
d = [2:-1:-2];
y_correct = [1024, 87 -1568 -4151 -7896];
for i = 1:5
coefficients = [a(i) b(i) c(i) d(i)];
assert(isequal(your_fcn_name(x(i),coefficients),y_correct(i)))
end
|
420 Solvers
Calculate the height of an object dropped from the sky
165 Solvers
411 Solvers
372 Solvers
Matlab Basics - y as a function of x
339 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!