Question
matlab help

16. (5 points) Given that Vo = 10 m/s, A = 30 degrees, and g = 9.81 m/s? Write a while loop (including initializations) that
0 0
Add a comment Improve this question Transcribed image text
Answer #1

clc;

v0      = 10;
g       = 9.81;
A       = 30;

h       = @(t) v0.*t.*sind(A) - g.*t.^2/2;
dt      = 0.1;

% Initialize
time    = 0;

% Print the heading
fprintf(sprintf('Time (s)    Height (m)\n'));

while h(time) >= 0
    fprintf(sprintf('%8.1f    %8.2f\n',time,h(time)));
    time = time + dt;
end

Time (s) Height (m) 0.00 0.45 0.80 1.06 0.2 0.3 0.4 0.5 1.22 1.27 0.8 0.9 1.0 1.23 1.10 0.86 0.53 0.09

Add a comment
Know the answer?
Add Answer to:
matlab help 16. (5 points) Given that Vo = 10 m/s, A = 30 degrees, and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • USE MATLAB TO SOLVE THIS PROBLEM USE MATLAB TO SOLVE THIS PROBLEM USE MATLAB TO SOLVE...

    USE MATLAB TO SOLVE THIS PROBLEM USE MATLAB TO SOLVE THIS PROBLEM USE MATLAB TO SOLVE THIS PROBLEM USE MATLAB TO SOLVE THIS PROBLEM USE MATLAB TO SOLVE THIS PROBLEM 3. The range, r, of a cannon projectile under the influence of gravity, g-9.81 m/s, and fired with muzzle velocity vo 10 m/s is determined by the angle its barrel makes with the ground, t. From your Physics classes you will recall that the range is calculated as: r() =...

  • by matlab programm please 3. A rocket is launched straight into the air with initial velocity...

    by matlab programm please 3. A rocket is launched straight into the air with initial velocity 200 ft/s. Assume the launch is instantaneous. How high will it go, and how long will that take (use time increments of 0.01 seconds)? G-- 32.2 ft/s, Ho-0 (the ground) V(t)-Vo+ g t H(t) Ho+ Vot+½gt The rocket deploys a parachute after 9 seconds and descends at a constant rate of 20 ft/sec. How long does it take to reach the ground? Plot the...

  • How to do this question using while loop only? What happens if you try to pay...

    How to do this question using while loop only? What happens if you try to pay less than $5 per month? In Chapter 1, we studied the problem of a projectile being launched at an angle of theta at an initial velocity of v. The equations for the height h and horizontal location x as functions of time t are as follows: h(t) = vt sin theta - 1/2 gt^2 x(t) = vt cos theta Write a MATLAB program to...

  • can you answer both #1 (a&B) and #2 please 1. Write MATLAB code to do the...

    can you answer both #1 (a&B) and #2 please 1. Write MATLAB code to do the following: (4 pts) a) Find the area of the circles where r=[7, 8, 10] using A = tr2 b) Find the distance traveled by a ball falling in the air is given by the equation x=x0+vot+ at?. Calculate the position of the ball at time t = 5s, XO = 10m, vo= 15 m/s, and a = 9.81 m/sec^2. Write MATLAB code to accomplish...

  • The height and speed of a projectile (such as a thrown ball) launched with a speed of

    12. The height and speed of a projectile (such as a thrown ball) launched with a speed of \(v_{0}\) at an angle \(A\) to the horizontal are given by$$ \begin{array}{c} h(t)=v_{0} t \sin A-0.5 g t^{2} \\ v(t)=\sqrt{v_{0}^{2}-2 v_{0} g t \sin A+g^{2} t^{2}} \end{array} $$where \(g\) is the acceleration due to gravity. The projectile will strike the ground when \(h(t)=0\), which gives the time to hit \(t_{\text {hit }}=2\left(v_{0} / g\right) \sin A\). Suppose that \(A=30^{\circ}, v_{0}=40 \mathrm{~m} /...

  • Please help with this exercise in Matlab 4 The range of an object shot at an...

    Please help with this exercise in Matlab 4 The range of an object shot at an angle θ (with respect toxaos), with the initial velocity of Va (in the absence of air resistance), is calculated by the following formula: va , sin(20) Range (0 052) And the trajectory of object is given by where h is the height of the object at each x location and g 9.81 m/s. Using n/8 increment size for the angle and Vo-10 m/s, plot...

  • The initial velocity of the boulder is Vo = 40 m/s and it is released at...

    The initial velocity of the boulder is Vo = 40 m/s and it is released at an angle ofa-55° above the horizontal as shown in the diagram below. Assume that the boulder is released at ground level at position 0. The projectile reaches its maximum height at position 1 and lands at its target at position 2. Given that the desired target is at a height of h2 - 30 m above ground level, calculate each of the following values...

  • Height 1. Start the PhET software. Feel free to "play" with the software and its various...

    Height 1. Start the PhET software. Feel free to "play" with the software and its various functions, Range but we will use the Lab section displayed on the opening page. Click into the Lab section. On the right hand side, make sure to deselect Air Resistance. Air resistance will remain off for this experiment. Mass and diameter of the cannonball will also remain fixed. Their value will not affect the outcomes we are studying. Set gravity to 9.81 m/s?. Set...

  • Problem#4 (Chapter 4) Name. A rootball is kicked with V 16 m/s at 30 degrees angle...

    Problem#4 (Chapter 4) Name. A rootball is kicked with V 16 m/s at 30 degrees angle as show a) Find the range ball will travel. b) Find time for the ball to reach maximum height, H c) Find speed of the ball at time = 1 sec onds after kick o H Maximum height +X R Range

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT