Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Include Page
SIMULATION: ANSYS MATLAB Google Analytics
SIMULATION: ANSYS MATLAB Google Analytics
Widget Connector
width600
urlhttps://www.youtube.com/watch?v=uXURYBVEv-c
height370
Widget Connector
width600
urlhttps://www.youtube.com/watch?v=IyRJmOd48NE
height370

The following video shows how to implement the Euler's integration method for one time-step.

...

briefly explains the concept of array pre-allocation. See this blog-post for more information about pre-allocation.

HTML
<iframe width="600" height="450" src="//www.youtube.com/embed/

...

iSVEN_feRKA?

...

We extend our script to perform the Euler integration over multiple time-steps by looping over the appropriate statements as shown in the video below.

Widget Connector
width600
urlhttps://www.youtube.com/watch?v=OaGJsamM8rw
height370

Our script saves only the final location of the mass. We are also interested in saving the intermediate locations so that we can make a plot of position vs. time. We do this by creating arrays for the position and time as shown in the video below.

...

rel=0" frameborder="0" allowfullscreen></iframe>