%%Scilab code for projectile motion
clear all
close all
%1st projectile
v=90;angle=20;g=9.81;
[X,Y]=Projectile(v,angle,g);
figure(1)
subplot(4,1,1)
plot(X,Y)
legend('For angle 20')
xlabel('X in m.')
ylabel('Y in m.')
title('Projectile motion')
ylim([0 250])
xlim([0 900])
%2nd projectile
v=90;angle=30;g=9.81;
[X,Y]=Projectile(v,angle,g);
subplot(4,1,2)
plot(X,Y)
legend('For angle 30')
xlabel('X in m.')
ylabel('Y in m.')
title('Projectile motion')
ylim([0 250])
xlim([0 900])
%3rd projectile
v=90;angle=40;g=9.81;
[X,Y]=Projectile(v,angle,g);
subplot(4,1,3)
plot(X,Y)
legend('For angle 40')
xlabel('X in m.')
ylabel('Y in m.')
title('Projectile motion')
ylim([0 250])
xlim([0 900])
%4th projectile
v=90;angle=50;g=9.81;
[X,Y]=Projectile(v,angle,g);
subplot(4,1,4)
plot(X,Y)
legend('For angle 50')
xlabel('X in m.')
ylabel('Y in m.')
title('Projectile motion')
ylim([0 250])
xlim([0 900])
%%Function for projectile motion
function [X,Y]=Projectile(Velocity,angle,gravity)
v0=Velocity;
th=(pi/180)*angle;
t=0; k=1; yy=1;
X(1)=0;Y(1)=0;
while yy>-0.01
t=t+0.1;
k=k+1;
X(k)=v0*t*cos(th);
Y(k)=v0*t*sin(th)-0.5*gravity*t^2;
yy=Y(k);
end
end
%%%%%%%%%%%%%%% End of Code %%%%%%%%%%%%%
For this homework you will be creating functions in SciLab. You will turn in electronically, each of the functions requ...
HW#5 Functions and Arrays For HW#5 we will return to the state method of solving the ballistic projectile problem with added twists. The goal will be to hit a target 1000 meters east of your cannon but the wind is blowing from the south. Your initial muzzle velocity is fixed at 110 meters per second, but you can control the elevation and azimuth angles of your aim. Elevation angle is measured up or down. Azimuth angle is measured right or...
ENES 100 Due 11/14/2018 Homework #6 Submit all your work in a thumb drive or via email using the appropriate filenames 1. When an object is launched from the ground with an initial velocity of vo at an angle of 0o, the horizontal and vertical displacements of the object travel before it hits ground can be written as functions of time t: x(t) - vo t cos(e) Uo Figure 1: Projectile of an object. A baseball has been tossed with...
I want the math lab code for theses problems in a unique way Theory A projectile is launched from point A up an incline plane that makes an angle of 10 with the horizontal. The mountain is 6,000 m high. Vo 10° Figure 1: Flightpath of a projectile. If we neglect the air resistance, the flight path of a projectile launched at an initial speed vo and an angle θ of departure relative to the horizontal is a parabola (see...
1 2 A projectile PA is launched from point A towards the east with an initial launch velocity ves and an initial launch angle of 8aA. The impact point of the projectile Pa is a point B in a valley with an ordinate, you, located below the elevation of point A. The launch from point A is instantaneously detected at point B, and a counter projectile Pa ts launched simultaneously towards the west to intercept the incoming projectile PA. Projectile...
Please help me correct my MATLAB script code for this problem, thank you!! A projectile PA is launched from point A towards the east with an initial launch velocity voa and an initial lauw angle of 0x. The impact point of the projectile Pa is a point B in a valley with an ordinate, yon, located below the clevation of point A. The launch from point A is instantaneously detected at point B, and a counter projectile P launched simultaneously...
A projectile is shot from the edge of a cliff 115 m above ground level with an initial speed of vo = 66 m/s at an angle of 35.0° with the horizontal, as shown in the figure (Figure 1). Figure 1 of 1 Vo 135.0 h=115 m X constants Part A Determine the time taken by the projectile to hit point P at ground level. Express your answer to three significant figures and include the appropriate units. o μΑ ?...
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...
this is how output should look CSC1101 TakeHome Lab02 (1),docx - Compatibility Mode Saved to this PC S Review View. Help Search 3. [11] You have been hired by Projectile Objects to create a calculator for various equations from kinematics. Suppose someone shoots an object and it does projectile motion with an angle of 30, 45 and 60 degrees to the horizontal. Choose it's initial velocity (ex. 10 m/s) find the maximum height it can reach, horizontal displacement and total...
C++ should be used C++ should be used CSC1101 TakeHome Lab02 (1),docx - Compatibility Mode Saved to this PC s Review View Help ρ Search 3. [11] You have been hired by Projectile Objects to create a calculator for various equations from kinematics. Suppose someone shoots an object and it does projectile motion with an angle of 30, 45 and 60 degrees to the horizontal. Choose it's initial velocity (ex. 10 m/s) find the maximum height it can reach, horizontal...
MATLAB You Cannot Use guide, You must create a GUI using code only Problem 1 (100 pts) This week you will repeat the second problem from Week 8 (the problem is restated below for your convenience) but you will add a GUI (without using guide) for the user to control the execution of the program. Your program should do the following: Create a figure that contains a plotting area and user interface controls Allow the user to input the initial...