Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = [1 5 8 9 7 4 5];
y_correct = roots(x);
assert(isequal(return_root(x),y_correct))
x = [1 0 0 48 50];
y_correct = roots(x);
assert(isequal(return_root(x),y_correct))
x = [11 55 4 6 ];
y_correct = roots(x)
assert(isequal(return_root(x),y_correct))
y_correct =
-4.948792226151728 + 0.000000000000000i
-0.025603886924136 + 0.331004790708340i
-0.025603886924136 - 0.331004790708340i
|
434 Solvers
Reverse the elements of an array
564 Solvers
396 Solvers
Matlab Basics II - Create a vector with a repeated entry
139 Solvers
Matrix of almost all zeros, except for main diagonal
124 Solvers