Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started