Problem 1072. Television Screen Dimensions
Given a width to height ratio of a TV screen given as w and h as well as the diagonal length of the television l, return the actual width and height of the screen to one decimal point of precision.
Example:
w = 16; h = 9; l = 42; [W,H] = teledims(w,h,l);
outputs
W = 36.6 H = 20.6
Solution Stats
Problem Comments
-
4 Comments
Show
1 older comment
@bmtran (Bryant Tran)
on 4 Dec 2012
Thanks James, I've fixed it now.
Rafael Cruz
on 4 Dec 2012
I also used round, but I not seen to be the best solution.
vandeleeuw
on 22 Oct 2018
36.6/20.6==16/9 is false.
The values from the test suite are also inaccurate.
Solution Comments
Show commentsGroup

Computational Geometry I
- 20 Problems
- 107 Finishers
- Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
- Calculate the area of a triangle between three points
- Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
- Television Screen Dimensions
- Find third Side of a right triangle given hypotenuse and a side. No * - or other functions allowed
- Calculate the area of a triangle between three points
- Are all the three given point in the same line?
- Volume of a Parallelepiped
- Spherical radius given four points
- Angle between Two Vectors
- Is the Point in a Circle?
- What is the distance from point P(x,y) to the line Ax + By + C = 0?
- Covering area
- Clock Hand Angle 1
- Angle between two vectors
- Similar Triangles - find the height of the tree
- Circumscribed circles
- Are you in or are you out?
- Clockwise or Counterclockwise
- Smallest distance between a point and a rectangle
- Great Circle Distance
- Right and wrong
Problem Recent Solvers542
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!