필터 지우기
필터 지우기

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