Not sure if i've writen this program properly

A block with mass M = 2.0kg slides around a vertical circular track with a radius of R. Assume that friction between the block and the track is negligible.
What is the minimum speed the block must have at the top of the track in order to ensure that it does not leave the track at the top?
Write matlab program that prompts user to input the Radius of the circular track and then calculate and display the minimum speed of the block.
You can use the following formula to calculate the minimum speed (v).
G is the gravity = 9.8 m/s2
This is what i've done so far:
radius = input('Input The length of the radius: ')
gravity = [980];
v = sqrt (980*radius);
fprintf ('The minimum speed as %.2f\n' ,v);

Answers (1)

Your code looks ok, except that, since your gravity is in cm/sec^2, it should probably be slightly modified to
radius = input('Input The length of the radius in cm: ')
gravity = 980;
v = sqrt (980*radius);
fprintf ('The minimum speed as %.2f cm/s \n' ,v);

Categories

Find more on General Physics in Help Center and File Exchange

Asked:

on 9 Dec 2020

Answered:

on 9 Dec 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!