1D linear advection equation initial conditions
2 ビュー (過去 30 日間)
古いコメントを表示
I am new to Matlab and I got an exercise which I don't know how to approach.
In order to solve the 1D linear advection equation, I make use of the Lax-Friedrichs flux.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/292056/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/292056/image.jpeg)
With
% initial condition, exact final solution
u0 = 1.0*(x<0.2);
uf = 1.0*(x>T&x<T+.2);
Now I need to adapt this model to work with another set of initial conditions, depending on x, namely
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/292057/image.jpeg)
Perhaps someone can help me by using an example or so.
Thanks for explaining and helping on beforehand.
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!