Advection Equation: Upwind Function and Runge-Kutta 4th Order

2 ビュー (過去 30 日間)
mohamad hoseini
mohamad hoseini 2018 年 11 月 1 日
編集済み: mohamad hoseini 2018 年 11 月 4 日
Hello dear all,
I have a PDE to solve by Runge-Kutta method which is du/dt=(u(i)-u(i-1))/2. I know how to write Runge-Kutta formulation in Matlab but I have problem with adjusting (u(i)-u(i-1))/2 as the function in this code. The initial value for "u" is "u=sin(2*pi*x)" for x=0:0.1:1.
I appreciate if somebody tell me how to set "(u(i)-u(i-1))/2" as the function for Runge-Kutta 4th order.

回答 (0 件)

カテゴリ

Help Center および File ExchangeBoundary Conditions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by