skydiver_func5 - Create formatted outputs for final...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 function v = skydiver_func5(m,g,c,t) % Function to calculate skydiver falling speed % for specified parameter values and time vector % using the analytic solution. % % Inputs: mass m (kg) % gravity g (m/s^2) % drag coefficient c (kg/m) % time vector (s) % % Outputs: falling speed vector v (m/s) v = sqrt(m*g/c)*tanh(sqrt(g*c/m)*t)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % Create formatted outputs for final velocity and final time npts = size(t,1) vf = v(npts,1) tf = t(npts,1) fprintf('The final falling speed is %5.2f m/s at time %d sec\n', vf, tf) pause % Create formatted table for all time and speed values fprintf(' Time Speed\n') fprintf(' %3.1f %5.2f\n', t, v)...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online