ENGRMAE 10 Lecture Notes - Lecture 12: Numerical Integration, Dont
Document Summary
% policy, review assignment, multiple functions in m-file. % 2. review of end of lecture12: function files, local/global. % put the main program and function in one file (see link at the beginning. % for loop we know the range. % problem 2: cannon ball max height, time to max height, speed at max h. % while loop (we don"t know where/when the max occurs) % need a condition for the the while loop to find max height. % see the web link in the assignment. % 1. filename must be the same as the function name. % 2. function name rules are same as for variables. % must start with character, no key words, use names that makes sense. % 3. function file must be in same directory as main script. % 5. if call without all outputs, only the first output is returned. % 6. program the function for the inputs you expect (use "dot" operator if necessary)