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
|
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)
|
Find state names that end with the letter A
707 Solvers
Create a cell array out of a struct
507 Solvers
Project Euler: Problem 3, Largest prime factor
379 Solvers
Project Euler: Problem 10, Sum of Primes
707 Solvers
394 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!