You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Unable to render {include} The included page could not be found.
Unable to render {include} The included page could not be found.

Step 4: Function Creation

Let's separate out the Euler's method in its own function. This makes our code modular. Anytime we want to perform an Euler integration, say, for different time steps, we can just call the function. Follow the steps in the video below to create this function.


We use the debugger to step into the function and understand the execution flow and how variables are handled in a function. A very important take away is that variables created within a function are local to that function and go away when the function call is completed. Only the values passed back to the calling function are retained.



Go to Step 5: Structure Creation

Go to all MATLAB Learning Modules

  • No labels