Question

Please solve using Matlab ONLY

Computational Modeling

The range of an object shot at an angle theta with respect to the x-axis and an initial velocity v0 is given by the trajectory shown below. The Range can be obtained by the following equation,

2 v0 Range =-sin (20) Range

The above equation neglects air resistance and uses standard gravity of g = 9.81 m/s2. Write a matlab code in order to calculate the Range for velocity range 0≤ vo ≤100 m/s and shooting angle range 0 ≤ theta ≤ 90°. Find the angle that gives the maximum range

0 0
Add a comment Improve this question Transcribed image text
Answer #1

clc;
maxr = 0.0;
g = 9.81;

for velocity = 1:100
    for angle = 0:90
        range = ((velocity*velocity)/g)*sind(2*angle);
        if (range > maxr)
            maxr = range;
            maxv = velocity;
            maxa = angle;
        end
    end
end

fprintf ('The maximum range is found for velocity = %f m/s and angle = %f degrees.\n', maxv, maxa);
fprintf ('Maximum range = %f m\n\n', maxr);

As you can see above, I have provided you the screenshot of the output and everything is working perfectly.

Let me know if you face any issues. Thank you.

Add a comment
Know the answer?
Add Answer to:
Please solve using Matlab ONLY Computational Modeling The range of an object shot at an angle...
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
  • please solve it using MATLAB The range of an object shot at an angle theta with...

    please solve it using MATLAB The range of an object shot at an angle theta with respect to the x-axis and an initial velocity v_0 (Figure P3.16) is given by Range = v^2_0/g sin (2 theta) for 0 lessthanorequalto theta lessthanorequalto pi/2 and neglecting air resistance. Use g = 9.81 m/s^2 and an initial velocity v_0 of 100 m/s. Show that the maximum range is obtained at approximately theta = pi/4 by computing the range in increments of pi/100 between...

  • 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...

  • MATLAB Program Problem A projectile is shot at an angle of 50 degrees with respect to...

    MATLAB Program Problem A projectile is shot at an angle of 50 degrees with respect to the horizontal at a velocity of 200 m/s. Earth's gravity is 9.81 m/s 2. Take the variable x as the range and y as the altitude. Create a MATLAB plot, which plots that trajectory. Now, assume the terrain slopes up by 1 m in y for every 10 m in x. On the same axis, plot the line of the terrain in a different...

  • 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...

  • A projectile is shot at an angle of 50 degrees with respect to the horizontal at...

    A projectile is shot at an angle of 50 degrees with respect to the horizontal at a velocity of 200 m/s. Earth's gravity is 9.81 m/s^2. Take the variable x as the range and y as the altitude. Create a MATLAB plot, which plots that trajectory. Now, assume the terrain slopes up by 1 m in y for every 10 m in x. On the same axis, plot the line of the terrain in a different color. (without using a...

  • 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() =...

  • USE MATLAB TO SOLVE PLEASE 42. The velocity, v, of an object that falls freely due...

    USE MATLAB TO SOLVE PLEASE 42. The velocity, v, of an object that falls freely due to the Earth gravity can be modeled with the equation: - mg + kv? dt where m is the mass of the object, g = 9.81 m/s2, and k is a constant. Solve the equation for v for the case that m = 5 kg, k = 0.05 kg/m, 0<t<15 s, and wo) = 0 m/s. Make a plot of v as a function...

  • Solve in Matlab Suppose that the position of a falling object is governed by the following differential equation: where c a first-order drag coefficient 12.5 kg/s, m mass 70 kg, and g gravitational a...

    Solve in Matlab Suppose that the position of a falling object is governed by the following differential equation: where c a first-order drag coefficient 12.5 kg/s, m mass 70 kg, and g gravitational acceleration = 9.81 m/s2. Use the shooting method to solve this equation for the boundary conditions: x(0) = 0 x( 12) = 500 Suppose that the position of a falling object is governed by the following differential equation: where c a first-order drag coefficient 12.5 kg/s, m...

  • Homework: Homework 5 - Applications and Modeling Save Score: 0 of 1 pt 13 of 15...

    Homework: Homework 5 - Applications and Modeling Save Score: 0 of 1 pt 13 of 15 (0 complete) HW Score: 0%, 0 of 15 pts 3.4.9 Question Help An object of mass 125 kg is released from rest from a boat into the water and allowed to sink. While gravity is pulling the object down, a buoyancy force of 50 times the weight of the object is pushing the object up (weight = mg). If we assume that water resistance...

  • *** SOLVE USING MATLAB *** Problem 2 A ball thrown up falls back to the floor...

    *** SOLVE USING MATLAB *** Problem 2 A ball thrown up falls back to the floor and bounces many times. For a ball thrown up in the direction shown in the figure, position of the ball as a function of time is given by: the The velocities in the x and y directions are constants throughout the motion and are given byo sin ()cosa) and ysin ()sin(a). In the vertical z direc- tion the initial velocity is v, = cos(9),...

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