0% found this document useful (0 votes)
14 views1 page

Force Matlab.m

Uploaded by

Yash Mathuria
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views1 page

Force Matlab.m

Uploaded by

Yash Mathuria
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

%

clc
clear
Wt=0.5;
a_y=80*sin(50*(pi/180));
a_x=80*cos(50*(180/pi));
u_y=80*sin(50*(pi/180));
u_x=80*cos(50*(pi/180));
g=9.8;
t0=(2*u_y/g);
t=linspace(0,t0);
t2=(t.^2);
y=(u_y.*t)-(0.5*((g).*(t2)));
x=u_x.*t;
%plot(x,y)

%part B
m_missile=10
t1=500/u_x
y1=(u_y.*t1)-(0.5*((g).*(t1)^2))
y_missile=y1;
x_missile=500;
u_ymissile=(y_missile+(0.5*((g).*(t1)^2)))/t1;
u_xmissile=u_x;
t0=(2*u_ymissile/g);
t=linspace(0,t0);
x_f_missile=(1000-u_xmissile.*t);
y_f_missile=(u_ymissile.*t)-(0.5*((g).*(t.^2)));
plot(x,y,x_f_missile,y_f_missile);
% for i=1:length(x_f_missile)
% hold on
% plot(x(i),y(i),'--')
% plot(x_f_missile(i),y_f_missile(i),'o')
% pause(0.01)
% end
% hold off
angle=(atan2d(u_ymissile,u_xmissile));
force=(m_missile)*(sqrt((u_xmissile)^2+(u_ymissile)^2));
disp(force)
disp(angle)

You might also like