This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = 1
length_correct = 3/sqrt(10);
width_correct = 1/sqrt(10);
[width, length] = rectangle(x);
tolerance = 1e-12;
assert( abs(length-length_correct)<tolerance && abs(width-width_correct)<tolerance )
x =
1
width =
0.3162
|
2 | Pass |
%%
x = 2;
width_correct = 2/sqrt(10);
length_correct = 6/sqrt(10);
[width, length] = rectangle(x);
tolerance = 1e-12;
assert(abs(length-length_correct)<tolerance && abs(width-width_correct)<tolerance)
width =
0.6325
|
Read a column of numbers and interpolate missing data
1235 Solvers
Back to basics 12 - Input Arguments
525 Solvers
Basics: 'Find the eigenvalues of given matrix
323 Solvers
find the maximum element of the matrix
348 Solvers
390 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!