hw1 4

advertisement
% HW1 1.4
function y = freefallcalc(v,ss,t)
% v = initial velocity
% ss = step size
% t = total drop time
% (a)freefallcalc(0,1,12)
% (b)freefallcalc(0,0.5,12)
for time = v:ss:t
if time == 0 & v == 0
fprintf ( 'v = 0
time = 0\n', v, time)
end
if time ~= 0
g = 9.81;
c = 12.5;
m = 68.1;
% pdf1 slayt23 de olan denklem
v = v + (ss)*(g-(c*v)/m);
fprintf ( 'v = %f
time = %f\n', v, time)
end
end
Not enough input arguments.
Error in freefallcalc (line 12)
for time = v:ss:t
Published with MATLAB® R2018a
1
Download
Related flashcards
Create Flashcards