If a circle has a diameter of x and a circumference of y find the chord length which is Z and round it to 3 decimal places.
Solution Stats
Problem Comments
10 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers24
Suggested Problems
-
Back to basics 22 - Rotate a matrix
932 Solvers
-
Relative ratio of "1" in binary number
1592 Solvers
-
575 Solvers
-
Find minimum and maximum elements of an array
142 Solvers
-
6009 Solvers
More from this Author4
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Hello Fatima Abdullah HCT 2021,
I interpreted circumference y as arclength and computed the length of the chord subtending the angle. I get 0.841 for the first test. Please check the angle in your code. As it is written, it is not dimensionless.
Hello ChrisR!
Just use the chord length formula using trigonometry and then the rounding command. That's it!
I added extra test suite. You can check them.
I have to agree with ChrisR. None of the answers are correct. The first two answers are using the diameter as if it were the radius when calculating the angle. I don't know what the third one has done.
I will give you a hint! go ahead and google Chord Length Using Trigonometry. You will easily answer the question!
Fatima, your solution takes the angle (i.e., half of the angle of the chord) as y/2. If the arclength is y and the radius is x/2, then the full angle is y/(x/2), and half of the angle is y/x.
By "circumference", do you mean the angle measured in radians?
Yes in radians.
@Fatima, mention it in the problem statement as it is quite ambiguous
HI Fatima, I think the correct term is "central angle" instead of circumference.
As I've said in one of your previous problems, Fatima. Human language is imprecise. It would help if you replaced the noun circumference with the noun central angle. It was probably a translation problem; however, if you had drawn a sketch, no one would have had any doubts about what you meant. Or use an example if you don't like to sketch.