xo=input('Enter the initial horizontal position: \n'); yo=input('\nEnter the initial vertical position: \n'); vo=input('\nEnter the initial velocity: \n'); th=input('\nEnter the angle of projection:...


xo=input('Enter the initial horizontal position: \n');



yo=input('\nEnter the initial vertical position: \n');



vo=input('\nEnter the initial velocity: \n');



th=input('\nEnter the angle of projection: \n');



Hmax=vo^2*sind(th)*sind(th)/(2*9.81);



Range=vo^2*sind(2*th)/9.81;



xfinal=xo+Range;



totaltime=2*vo*sind(th)/9.81;



tspan=0:0.001:totaltime;



x=vo.*cosd(th).*tspan+xo;y=-0.5.*9.81.*tspan.^2+vo.*sind(th).*tspan+yo;



plot(x,y,'-b','LineWidth',2.5);



xlabel('x');ylabel('y');title('Trajectory')



fprintf('\n-Maximum height is: %f m .\n\n-The range is : %f m \n\n-The final horizontal position is: %f m ',Hmax,Range,xfinal)




this is my code for the previous question p1.


P2 (70%). Assuming that horizontal position is 0, expand the program<br>you developed in P1 in a way that it can get a range for initial vertical position<br>or velocity or angle of projection or any combination of these variables and<br>plot possible motion of path considering the range given for each variable.<br>Using this program, do the following calculations/actions:<br>a) Possible height and range, assuming that initial vertical position and<br>velocity are constant (5%)<br>b) Plot possible paths of motion for part a (5%)<br>c) Possible height and range, assuming that angle of projection and<br>velocity are constant (5%)<br>d) Plot possible paths of motion for part c (5%)<br>2<br>e) Possible height and range, assuming that angle of projection and vertical<br>position are constant (5%)<br>f) Plot possible paths of motion for part e (5%)<br>g) Possible height and range, assuming that only vertical position is<br>constant (5%)<br>h) Plot possible paths of motion for part g (5%)<br>i) Possible height and range, assuming that only angle of projection is<br>constant (5%)<br>j) Plot possible paths of motion for part I (5%)<br>k) Possible height and range, assuming that only initial velocity is constant<br>(5%)<br>I) Plot possible paths of motion for part k (5%)<br>m) Possible height and range, assuming that all variables are changing<br>(5%).<br>n) Plot possible paths of motion for part m (5%)<br>Hints:<br>1. Consider 10 monotonic values for each of the variable that are perturbed<br>(i.e. vertical position, velocity, angle of projection).<br>2. For part m, the results for height and range should go in 3D matrices.<br>3. For part b, d, f, h, j, I and n all the paths should be plotted in one figure.<br>

Extracted text: P2 (70%). Assuming that horizontal position is 0, expand the program you developed in P1 in a way that it can get a range for initial vertical position or velocity or angle of projection or any combination of these variables and plot possible motion of path considering the range given for each variable. Using this program, do the following calculations/actions: a) Possible height and range, assuming that initial vertical position and velocity are constant (5%) b) Plot possible paths of motion for part a (5%) c) Possible height and range, assuming that angle of projection and velocity are constant (5%) d) Plot possible paths of motion for part c (5%) 2 e) Possible height and range, assuming that angle of projection and vertical position are constant (5%) f) Plot possible paths of motion for part e (5%) g) Possible height and range, assuming that only vertical position is constant (5%) h) Plot possible paths of motion for part g (5%) i) Possible height and range, assuming that only angle of projection is constant (5%) j) Plot possible paths of motion for part I (5%) k) Possible height and range, assuming that only initial velocity is constant (5%) I) Plot possible paths of motion for part k (5%) m) Possible height and range, assuming that all variables are changing (5%). n) Plot possible paths of motion for part m (5%) Hints: 1. Consider 10 monotonic values for each of the variable that are perturbed (i.e. vertical position, velocity, angle of projection). 2. For part m, the results for height and range should go in 3D matrices. 3. For part b, d, f, h, j, I and n all the paths should be plotted in one figure.
Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here