Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 1
length_correct = 3/sqrt(10);
width_correct = 1/sqrt(10);
[width, length] = findRectangleDimensions(x);
tolerance = 1e-12;
assert( abs(length-length_correct)<tolerance && abs(width-width_correct)<tolerance )
x =
1
length =
0.9487
width =
0.3162
|
2 | Pass |
x = 2;
width_correct = 2/sqrt(10);
length_correct = 6/sqrt(10);
[width, length] = findRectangleDimensions(x);
tolerance = 1e-12;
assert(abs(length-length_correct)<tolerance && abs(width-width_correct)<tolerance)
length =
1.8974
width =
0.6325
|
Back to basics 23 - Triangular matrix
634 Solvers
Create a square matrix of multiples
383 Solvers
299 Solvers
Fix the last element of a cell array
344 Solvers
257 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!