freefallfunc - g=input('Gravity?'); m=input('Mass?');...

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

View Full Document Right Arrow Icon
%John Wade %example of a function calling another function %also example of fprintf %takes g, m, cd, and computes v %similar to ex. 3.3 in book function velocity = freefallfunc
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: g=input('Gravity?'); m=input('Mass?'); cd=input('Drag coeff?'); t=input('time?'); t v=vel(g,m,cd,t); %disp(v) % fprintf('the velocity is %8.4f\n,', v) f...
View Full Document

Ask a homework question - tutors are online