Solution to ODE in matlab or simulink
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
I would be thankful if someone gives a comment on how to solve the following equation in MATLAB/Simulink with ODE45 or ODE15s...It's equation number 3 in this publication [Link]. (Picture of the equation is attached).
It's basically a material balance equation of solid particles in ractor.
Thanks in advance.
![matlabequation.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/241195/matlabequation.jpeg)
2 件のコメント
Sulaymon Eshkabilov
2019 年 10 月 5 日
Hi
Your equation as it does not appear to be correct. Could you please post the correct one?
回答 (1 件)
darova
2019 年 10 月 5 日
I tried to solve this equation first
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/241255/image.png)
What are constants values?
% opengl software
G = 2;
V = 2.4;
Q = 5;
J = 1;
n0 = 1.1;
num1 = 30;
num2 = 40;
n = zeros(num1,num2);
L = linspace(0,30,num1);
t = linspace(0,100,num2);
dL = L(2) - L(1);
dt = t(2) - t(1);
for i = 1:100
n(end,:) = J/G;
n(:,1) = n0;
[dnt, dnL] = gradient(n,dt,dL);
n = -V/Q*(dnt+G*dnL);
surf(t,L,n)
pause(0.1)
end
The result
![gif_animation.gif](https://www.mathworks.com/matlabcentral/answers/uploaded_files/241256/gif_animation.gif)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!