You are on page 1of 3

EXPERIMENT 5

QUESTION 1
SCRIPT FILE
clear,clc
x=[0:12:5000];
CB=sqrt(x.^2+3000^2);
AC=10000-x;
Tac=8.6./AC;
Tcb=3.9./CB;
T=Tac+Tcb;
[value xposition]=min(T);
Answer=x(xposition);
fprintf('the value of x which corresponds to the shortest time is
%.4fFt. \n',Answer)

COMMAND BAR

QUESTION 2
SCRIPT FILE
clear,clc
area=600;
a=10:0.1:120;
h=2*area./a;
theta=atan(a./(2*h));
H=2+h+2./sin(theta);
B=2.*H.*tan(theta);
A=0.5.*B.*H;
[min_A ind]=min(A);
outer_base=B(ind)
outer_height=H(ind)
inner_base=a(ind)
outer_height=h(ind)

COMMAND BAR
QUESTION 3
SCRIPT FILE
clc,clear
g=9.806;
Qa=43;
Qb=50;
aux=560*cosd(Qa);
bux=680*cosd(Qb);
auy=560*sind(Qa);
buy=680*sind(Qb);
projTimeA=2*auy/g;
projTimeB=2*buy/g;
fprintf('since Time of projectile A is lesser than projectile b
so projectile b will hit first .\n')
t=[0:projTimeA/10:projTimeA];

Roax=[t.*aux];
Roay=[((auy.*t)-(0.5*g.*t.^2))];
Robx=[t.*bux];
Roby=[((buy.*t)-(0.5*g.*t.^2))];
rABx=Robx-Roax;
rABy=Roby-Roay;
rAB=[rABx' rABy'];
disp(' Time rAB')
Result=[t' rAB]
COMMAND BAR

QUESTION 4
SCRIPT FILE
clear,clc;
h=2;
g=9.81;
n=[1:8];
v=sqrt(2*g*h)*(0.85)*n;
t=v/g;
disp(' n t')
[n' t']

COMMAND BAR

You might also like