One way to create a second-order ode is to type
Variable x'' = cos(2*t) + sin(x)Note: t is an independent variable (e.g., time). Note: The prime symbol ' denotes differentiation with respect to t. Note: Commands may be entered from a text file, e.g., SecondOrderODE.txt. To input values (and units) for numerical integration parameters, type Input tFinal=20 sec, integStp=0.02 sec, absErr=1.0E-08, relErr=1.0E-08 To input initial values (with units) for x and x', type Input x=1 m, x'=0.2 m/sec |
|
Output t sec, x m, x' m/sec, x'' km/sec^2, 3*x^2 ft^2
To immediately solve the ode and output to the file SecondOrderODE.1, type
ODE() SecondOrderODE
The data in this file can be plotted as shown above with a plotting program.
Note: For example, on PC Windows, use MotionGenesis Plotting Software.
|
|
|
|
|
|
|
Compile and link source code.
Modify input values in SecondOrderODE.in Note: Compiled codes optimize for its processor. |
|
|
|
Compile and link source code.
Modify input values in SecondOrderODE.in Note: Compiled codes optimize for its processor. |
|
|
|
Modify input values in SecondOrderODE.m
Note: Interpreted .m codes are slower than compiled codes. |
|
|
|
Modify input values in SecondOrderODE.m
Note: Interpreted .m codes are slower than compiled codes. |