Unformatted text preview: t = (0:0.1:20)' case 3 t = (0:0.1:20)' end v = sqrt(m*g/c)*tanh(sqrt(g*c/m)*t) % Determine if terminal velocity was reached tol = 1e-4 npts = size(v,1) dv = abs(v(npts,1)-v(npts-1,1)) % How can we use a switch statement to print out the correct message? % We need to turn dv into either a string or an integer. if dv < tol message = 1 else message = 2 end switch message case 1 disp('Terminal velocity was researched.') case 2 disp('Terminal velocity was not reached.') end...
View Full Document
This note was uploaded on 09/05/2011 for the course EGM 3344 taught by Professor Raphaelhaftka during the Spring '09 term at University of Florida.
- Spring '09