Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = 10;
y_correct = [0.625 4];
assert(isequal(extract(x),y_correct))
y =
0.6250 4.0000
|
2 | Pass |
%%
x = 3.1416;
y_correct = [0.7854 2];
assert( abs(sum(extract(x) - y_correct)) < 0.0001)
y =
0.7854 2.0000
|
3 | Pass |
%%
x = -3;
y_correct = [-0.7500 2];
assert( abs(sum(extract(x) - y_correct)) < 0.0001)
y =
-0.7500 2.0000
|
4 | Pass |
%%
x = realmax('single');
y_correct = [1 128];
assert( abs(sum(extract(x) - y_correct)) < 0.0001)
y =
1.0000 128.0000
|
5 | Pass |
%%
x = 0;
y_correct = [0 0];
assert(isequal(extract(x),y_correct))
y =
0 0
|
188 Solvers
185 Solvers
Matrix indexing with two vectors of indices
485 Solvers
Switch matrix to a column vector
260 Solvers
Convert given decimal number to binary number.
636 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!