Euler method without for

Euler method without for - With vectors - 消息

#1 已发布: 2023/12/24 13:26:58
Valery Ochkov

Valery Ochkov

67个赞,共716个帖子。

组: User

I can’t figure out how to implement Euler method for solving ODEs without a for cycle - only with vectors.
Help please.
Rocket-s-Euler-vectors.sm (28.07 KiB)已下载 1558 次。
#2 已发布: 2023/12/24 19:07:27
StvMath

StvMath

44个赞和1个踩,共76个帖子。

组: User

Like this:

Euler.png

Rocket-s-Euler-vectors_b.sm (31.29 KiB)已下载 1509 次。

Correction: The term yb*i should just be yb.
1位用户喜欢此帖子
Valery Ochkov 2023/12/24 19:25:00
#3 已发布: 2023/12/24 19:26:31
Valery Ochkov

Valery Ochkov

67个赞,共716个帖子。

组: User

Thanks.
But I need without the line operator!
#4 已发布: 2023/12/24 20:22:39
StvMath

StvMath

44个赞和1个踩,共76个帖子。

组: User

Even simpler!

Euler.png

Rocket-s-Euler-vectors_c.sm (30.2 KiB)已下载 1459 次。

Correction: The term vb*i should just be vb
#5 已发布: 2023/12/24 23:26:20
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

I can’t figure out how to implement Euler method for solving ODEs without a for cycle - only with vectors.
Help please.


Further, you would have to collect pairwise.
Euler is a poor integrator vs the yardstick rkf4 [Fehlberg].
On my test function Euler deviates up to 0.07 ... damned inaccurate !
Jean

1位用户喜欢此帖子
Valery Ochkov 2023/12/25 16:24:00
#6 已发布: 2023/12/25 00:17:24
Valery Ochkov

Valery Ochkov

67个赞,共716个帖子。

组: User

Wrote

Wrote

I can’t figure out how to implement Euler method for solving ODEs without a for cycle - only with vectors.
Help please.


Further, you would have to collect pairwise.
Euler is a poor integrator vs the yardstick rkf4 [Fehlberg].
On my test function Euler deviates up to 0.07 ... damned inaccurate !
Jean



Three-Plots.png
#7 已发布: 2023/12/25 15:48:22
Valery Ochkov

Valery Ochkov

67个赞,共716个帖子。

组: User

Merry Christmas to everyone!
SCR.jpg
1位用户喜欢此帖子
Davide Carpi 2023/12/27 19:53:00
  • 有新帖
  • 无新帖