Need help with Euler method

1 view (last 30 days)
Christopher Ryan
Christopher Ryan on 6 Nov 2015
Commented: Torsten on 6 Nov 2015
Hi
I need to compared a Euler method equation with 2 different h values. I've the valves done in excel but cant compare these because the columns dont match up.
The formula is: x_1=x_0+h(αte^(-0.3t)+βx)
I worked it out in excel as: x_n=x_(n-1)+(t_n×(αt_(n-1) e^(-0.3t_(n-1) )+βx_(n-1) ))
Any help is greatly appreciated.
  1 Comment
Torsten
Torsten on 6 Nov 2015
Save arrays t1 and x1 for h1 as well as t2 and x2 for h2.
Then plot x1 vs. t1 and x2 vs. t2.
Best wishes
Torsten.

Sign in to comment.

Answers (0)

Categories

Find more on Data Import from MATLAB in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!