Write a program that generates three random numbers each


Create a program: graphs, or plots should have titles, labels for the axes and any other symbols that make them easy to read.

1. Asks the user for:  (i) the initial velocity vo , (ii) the angle of release measured relative to the horizontal θo , and (iii) the height of the launching point relative to the level ground, H. With this information, (a) Find the time of flight for the projectile, tf  =[  vo sin θo  + ( ( vo sin θo )2 +  2H g)1/2] /(g), with g = 9.80 m/s2 

      (b) Plot the trajectory of the projectile every  0.01 s. Here x and y are given by

       x = vo( cosθo ) t and   y =  H + vo ( sin θo ) t  - (g t2 ) / 2

2.  Write a program that generates three random numbers, each between 0 and 9. The three numbers are displayed and the message "You got Lucky Fours" will be displayed if at least two of the digits are 4.

3. plot the function:  y = -8xe^-x/8       in the interval:  0 less than or equal to x less than or equal to 20  in steps of 0.20

4. plot the function:  y = 5x^3   in the interval: 2 less than or equal to x less than or equal to 12  in steps of 0.05 the plot for problem 4 should be in either log-log or semi-log scale, so as to get a straight line.

 

 

Solution Preview :

Prepared by a verified Expert
MATLAB Programming: Write a program that generates three random numbers each
Reference No:- TGS01208124

Now Priced at $50 (50% Discount)

Recommended (92%)

Rated (4.4/5)

A

Anonymous user

2/29/2016 4:53:20 AM

As the given assignment is based on graphs or plots Create a program: graphs or plots must have titles, labels for the axes and any other symbols that make them easy to read. 1. Asks the user for: (i) the initial velocity vo, (ii) the angle of liberates computed relative to the horizontal ?o, and (iii) the height of the launching point relative to the level ground, H. With this information, (a) Find the time of flight for the projectile, tf =[ vo sin ?o + ( ( vo sin ?o )2 + 2H g)1/2] /(g), with g = 9.80 m/s2 (b) Plot the trajectory of the projectile every 0.01 s. Here x and y are specified via x = vo( cos?o ) t and y = H + vo ( sin ?o ) t - (g t2 ) / 2 2. Make a program that produces 3 random numbers, each between 0 and 9. The 3 numbers are displayed and the message ‘You got Lucky Fours’ will be displayed if at least two of the digits are 4.