Plot t versus v with line width 1.5, dotted, red colored line, triangle shaped,
ID: 3675741 • Letter: P
Question
Plot t versus v with line width 1.5, dotted, red colored line, triangle shaped, marker with size 10, black edge, and green face. A1-2. a. Determine the drae coefficient (cd) using the equation: cd = g*m/upsilon^2from the exploratory data analysis below: g=9.81 b. Find out average, maximum, and minimum of cd by the command meant(cd), max(cd), and min(cd) respectively. c. Determine the predicted terminal velocity by the equation, pred = g*m/cdavg, where cdavg=mean(cd). d. Plot measured velocity (v) vs. predicted terminal velocity (vpred) in the top half of a figure with circle shaped and drag coefficient (cd) vs. mass (m) in the bottom half with diamond shaped using subplot. A1-3. Using M-files (script and function files), execute the following statements for determining F: F = P(1 + i)^n F= the future worth, P= amount of money invested, $100,000, i=interest rate, 0.06, n= number of years, 7 A1-4. Using input and disp function, find out the value of Future worth (F) of A1-3 (use only script file) A1-5. Rearrange mass (m) and Velocity (v) of A1-2 in two columns as appropriate using fprintf function.Explanation / Answer
As mentioned in the question , i am not doing plots
'A1-2)
m=[83.6,60.2,72.1,91.1,92.9,65.3,80.9];
v=[53.4, 48.5, 50.9, 55.9,54,47.7,51.1 ];
g=9.81;
%answe a
cd = (g * m)./(v.*v)
%answer b
avarage_cd = mean(cd)
minimum_cd = min(cd)
maximum_cd = max(cd)
%answer c
pred = sqrt((g*m)/mean(cd))
A1-3)
function F = FutureWorth(p,i,n)
F=p;
for j=1:n
F=F*(1+i);
end
end
A1-4)
script file:
p=input('amount of money invested..?');
i=input('interest rate..?');
n=input('number of years..?');
F=FutureWorth(p,i,n)
FutureWorth.m:
function F = FutureWorth(p,i,n)
F=p;
for j=1:n
F=F*(1+i);
end
end
Output:
amount of money invested..?100000
interest rate..?0.06
number of years..?7
F = 1.5036e+05