フィルターのクリア

MATLAB Coding for BVP

1 回表示 (過去 30 日間)
Joy Salomi
Joy Salomi 2019 年 6 月 27 日
コメント済み: Joy Salomi 2020 年 3 月 4 日
function res = mat4bc(ya,yb)
res = [ ya(1)-1
yb(2)
ya(3)
yb(4) ];
The above is for 2 boundary conditions. I need the coding for 3 conditions.
function sol=ex4
ex4init=bvpinit(linspace(0,100),[0 1 0 -1]);
sol=bvp4c(@ex4ode, @ex4bc, ex4init)
end
function f=ex4ode(x,y)
f=[y(2)
-x*x*y(2)
y(4)
-x*x*y(4)
];
end
function res=ex4bc(ya,yb,yc)
res=[ya(1)-3.462*10^(-22)
ya(3)-2.017
yb(1)-1
yb(3)
yc(2)+yc(4)
];
end
This is my program. when I run this program, I'm getting an error. Can someone tell me what is the error here?
  6 件のコメント
Torsten
Torsten 2019 年 6 月 27 日
編集済み: Torsten 2019 年 6 月 27 日
Maybe of interest for you:
This code gives you the solution for your system:
function main
fun = @(t,c1,c2)c1*gamma(1/3)*gammainc(t.^3/3,1/3,'upper')/3^(2/3)+c2;
c2u = 1;
c1u = (3.462e-22-1)*3^(2/3)/gamma(1/3);
c2v = 0;
c1v = 2.017*3^(2/3)/gamma(1/3);
t = linspace(0,20,200);
u = fun(t,c1u,c2u);
v = fun(t,c1v,c2v)
plot(t,u,t,v)
end
Maybe your question was to determine lambda where du/dx = -dv/dx ?
Joy Salomi
Joy Salomi 2020 年 3 月 4 日
Thank you for your reply Sir.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by