Hi all(adsbygoogle = window.adsbygoogle || []).push({});

Im working on a systems dynamics problem which involves modelling a double pendulum, a chaotic system

I have a non linear system of 4 1st order differential equations which I need to solve using numerical methods in MATLAB

The methods are ode45, ode23s and euler method

Ive been able to model using the first 2 but am having problems with the euler method as this involves the variable 'h' in the euler algorithm and creating a unique function (as opposed to built in ones in matlab) and im not sure how to use loops and feval syntax and such

So for a system such as

x1' = f(x1,x2,x3,x4)

x2' = f(x1,x2,x3,x4)

x3' = f(x1,x2,x3,x4)

x4' = f(x1,x2,x3,x4)

How do you solve in matlab using the euler algorithm, y(i+1) = y(i) + hf(y,i)

my ultimate goal is to solve and graph points x1 and x3 with time (as these represent angles of the 2 pendulum branches)

Id appreciate any ideas on how to start with coding the euler algorithm in MATLAB and how apply user made functions, I don't know where to start......

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Euler Method in MATLAB

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads - Euler Method MATLAB | Date |
---|---|

Derive Euler–Bernoulli equation from Navier-Cauchy equations | Sep 11, 2015 |

Virtual work in finite plane bending of Euler-Bernoulli beam | Jul 17, 2015 |

Nonlinear Mass Spring Damper with Euler Bernoulli Beam | Jun 17, 2015 |

Bending of a Free Beam | Apr 15, 2015 |

I was wondering if the Euler buckling method is simply theoretical or | Jun 21, 2010 |

**Physics Forums - The Fusion of Science and Community**