From ODE45 ODE to """ PDE?
1 回表示 (過去 30 日間)
古いコメントを表示
Hi, I just received wonderful assistance from Torsten an the others here in regards with solving with ODE45 the given ODE:
y'''+(1-x^2)y=0
with code:
syms x
fun = @(x,y)[y(2);y(3);y(1)*(1-x^2)];
y0 = [1 0 1]; %y, y', y''
xspan = [-3 3];
[X,Y] = ode45(fun,xspan,y0);
%d3y = y(:,1) .* (1 - X .^ 2);
plot(X,Y(:,1))%,X,Y(:,2),X,Y(:,3),X,Y(:,1).* (2 + X .^ 2));
%plot(X,Y(:,1)=solution function)
%plot(X,Y(:,2)=first order derivative of the solution)
%plot(X,Y(:,3)=second order derivative of the solution)
If one wishes to solve this equation in a 2d disk (radial coodrdinates), which steps must one take?
Thanks
0 件のコメント
回答 (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!