Question: I am trying to create a plot for certain values. I am having troubles defining my range as well as creating the correct plot. I

I am trying to create a plot for certain values. I am having troubles defining my range as well as creating the correct plot. I am trying to create a for loop that goes through the loop with values theta 0 through 15. There is a value v_perp defined in the loop, and I want the plot to be of theta on the x axis and v_perp on the y. I only want it to plot values if v_perp is <= 0.4*v_tot. What I have so far is below:

THIS IS FOR MATLAB PROGRAM

v_min = 16.5;

v_avg = 18;

v_max = 19.5;

x_r = 21.45;

y_r = 1.265;

for theta = 0:15

A = -9.81/2; B = (v_min*sin(30))+(v_min*cos(30)*tan(theta)); C = 1.265+21.45*(tan(theta)); y = [A B C]; t = roots(y); v_perp = (-sin(-theta)*(16.5*cos(30)))+(cos(-theta)*((-9.81*t)+(16.5*cos(30)))); v_tot = sqrt((16.5*cos(30)).^2+(((-9.81*t)+(16.5*cos(30)))).^2); end plot(theta,v_perp,'-r') 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!