Problem 2019. Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width and length of the rectangle.
Solution Stats
Problem Comments
-
10 Comments
An interesting problem providing the sqrt(10) factor.
Do you know that "rectangle" is a Matlab function???????????????????????????????????
The function name 'rectangle' is duplicated with the built-in function. Cannot execute the test trial.
There was no correct solution since October, 12th, due to a defect in the test.
Thank you for renaming the function.
The test trials now can be executed correctly.
great problem
function [width, length] = findRectangleDimensions(x)
width =sqrt(x^2/10);
length = 3*width;
end
pretty interesting
good problem!
might be some confusion as to which dimension is width and length between the problem statement and the test suite?
Solution Comments
Show commentsProblem Recent Solvers5029
Suggested Problems
-
4048 Solvers
-
Project Euler: Problem 8, Find largest product in a large string of numbers
1079 Solvers
-
Project Euler: Problem 9, Pythagorean numbers
1130 Solvers
-
ベクトル [1 2 3 4 5 6 7 8 9 10] の作成
528 Solvers
-
497 Solvers
More from this Author10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!