| Include Page |
|---|
| SIMULATION: ANSYS MATLAB Google Analytics |
|---|
| SIMULATION: ANSYS MATLAB Google Analytics |
|---|
|
| Widget Connector |
|---|
| width | 600 |
|---|
| url | https://www.youtube.com/watch?v=uXURYBVEv-c |
|---|
| height | 370 |
|---|
|
| Widget Connector |
|---|
| width | 600 |
|---|
| url | https://www.youtube.com/watch?v=IyRJmOd48NE |
|---|
| height | 370 |
|---|
|
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/ |
...
...
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 |
|---|
| width | 600 |
|---|
| url | https://www.youtube.com/watch?v=OaGJsamM8rw |
|---|
| height | 370 |
|---|
|
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> |