Figs. 1, 2, 3 are not coming while using the following code
Ältere Kommentare anzeigen
Pr=1;Sc=1;
R=0.1;
xa=0;xb=6;
Lv = [-2.5:0.1:0];
for D=[ 0 0.5 1]
for i=1:length(Lv)
L = Lv(i);
fODE = @(x,y) [y(2); y(3); y(2)^2-y(3)*y(1)-1; y(5); -3*Pr*y(1)*y(5)/(3+4*R); y(7); -Sc*y(1)*y(7)];
BCres= @(ya,yb)[ya(1); ya(2)-L-D*ya(3); ya(4)-1; ya(6)-1; yb(2)-1; yb(4);yb(6)];
xint=linspace(xa,xb,101);
solinit1=bvpinit(xint,[0 1 0 1 0 1 0]);
solinit2=bvpinit(xint,[-1 -1 -1 -1 -1 -1 -1]);
sol1=bvp4c(fODE,BCres,solinit1);
sol2=bvp4c(fODE,BCres,solinit2);
sxint1=deval(sol1,xint);
sxint2=deval(sol2,xint);
Sk1(i,1) = sxint1(3,1);
Sk2(i,1) = sxint2(3,1);
end
figure(1)
plot(Lv,Sk1,'-',Lv,Sk2,'--','Linewidth',1.5);
xlabel('\bf \lambda');
ylabel('\bf C_{f}');
hold on
end
%%Please help with the following questions:
%% while using the code, Figs. 1, 2, 3 are not coming as curves, it came as lines.
%% Another help required is how to give a DOT mark at the end of 1st solution (as in PDF)
3 Kommentare
Anil Gautam
am 9 Jul. 2019
Hi @MINATI
I am trying to understand above programme, I have some doubt in above code. One of my doubt is in given line
solinit1=bvpinit(xint,[0 1 0 1 0 1 0]);
why you write [0 1 0 1 0 1 0]??
while boundary conditions is
ya(1); ya(2)-L-D*ya(3); ya(4)-1; ya(6)-1; yb(2)-1; yb(4);yb(6)
Thank you in Advance .
MINATI
am 16 Jul. 2019
Anil Gautam
am 23 Jul. 2019
In given line
solinit1=bvpinit(xint,[0 1 0 1 0 1 0]);
why you take [0 1 0 1 0 1 0] ??
can anyone take [0 0 0 0 0 0 0] ??
or [0 1 1 0 1 1 0] ??
Besically i want to understand the role of A in following line
solinit1=bvpinit(xint, A);
Thank you in advance
Antworten (1)
KALYAN ACHARJYA
am 7 Jun. 2019
Bearbeitet: KALYAN ACHARJYA
am 7 Jun. 2019
0 Stimmen
Keep figure, only, not figure(1)
3 Kommentare
MINATI PATRA
am 7 Jun. 2019
Bearbeitet: MINATI PATRA
am 7 Jun. 2019
@Kalyan Acharjya Using the code I am not getting the proper fig.as mentioned in PDF Please have a look into the code Thanks
MINATI
am 9 Jun. 2019
MINATI
am 17 Jul. 2019
Kategorien
Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!