I am not getting multiple graphs(iterative) when I run the code for a coupled bvp ODE using bvp4c

2 次查看(过去 30 天)
Two ODEs are:
F"=G(G^2+gamma^2)/(G^2+lambda*gamma^2)
G'= 1/3F'^2-2/3(F*F")
subject to: F(xi)=alpha/2, F'(xi)=1 at xi=0 where 'alpha' is a parameter (wall parameter)
F'(xi)= 0 as xi tends to infinity
I should be getting a multiple graphs varying the parameter ' alpha'
The code that I have run is:
function sol= proj
clc;clf;clear;
global lambda gama alp
lambda=0.5;
gama=1;
pp=[0:0.5:1.0];
figure(1)
plot(2,1);
solinit= bvpinit([0:0.01:10],[0,1,0]);
for alp= pp
sol= bvp4c(@projfun,@projbc,solinit);
solinit= sol;
plot(2,1);plot(sol.x,sol.y(2,:))
end
end
function f= projfun(x,y)
global lambda gama
f= [y(2);y(3)*(y(3)^2+gama.^2)/(y(3)^2+lambda*gama.^2);y(2)^2/3-(2*y(1)*y(3)*(y(3)^2+gama.^2))/(3*(y(3)^2+lambda*gama.^2))];
end
function res= projbc(ya,yb)
global alp
res= [ya(1)-alp/2; ya(2)-1.0; yb(2)];
end

采纳的回答

Torsten
Torsten 2017-12-6
https://de.mathworks.com/help/matlab/ref/hold.html
Best wishes
Torsten.
  21 个评论
Torsten
Torsten 2017-12-13
Yes, it's really alarming how much erroneous results are published under the pressure to "publish or perish".
Best wishes
Torsten.
naygarp
naygarp 2017-12-14
Yes after observing two research papers from well-known publishers, it's heartening to see how such details get missed. Anyway, thanks a lot for guiding me along.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Visual Exploration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by