How Can I plot Streamlines for the following code
Rva=[1 0.01];
for i=1:2
M= Rva (i);
lines = {‘:b’,’:g’};
lmd=1;
y=0.5;
gam=1;
N=0.0;
A=0;
B=1;
c1=(A+(B.*gam))./(1+gam);
c2=(B-A)./(1+gam);
T=c1+(c2.*y);
k1=(-N.*((A.^2)-(2.*A.*B)+(B.^2)))./((1+gam).^2);
k2=(-((2.*N.*(A.*B-(A.^2)-(A.*B.*gam)+(B.^2).*gam)+(B-A-(A.*gam)+(B.*gam)))))./((1+gam).^2);
k3=(-(N.*((A.^2)+(2.*A.*B.*gam)+(B.^2).*(gam.^2))+(A+(A.*gam)+(B.*gam)+(B.*(gam.^2)))))./((1+gam).^2);
x1=(1./(lmd.*M.*(cosh(M))+sinh(M)));
x2=((1-cosh(M)).*((2.*k1)+((M.^2).*k3))./(M.^4))+(k1+(k2.*(1+lmd.*(cosh(M)))))./(M.^2);
c4=x1.*x2;
c3=(lmd.*M.*c4)+((2.*k1+(M.^2).*k3)./(M.^4))-(lmd.*k2./(M.^2));
u=c3.*(cosh(M.*y))+c4.*(sinh(M.*y))-((k1.*(y.^2)+(k2.*y)+((2.*k1+(M.^2).*k3)./(M.^2))))./(M.^2);
t0=M.*c4-(k2./(M.^2));
t1=M.*(c3.*sinh(M)+c4.*cosh(M))-((2.*k1+k2)./(M.^2));
t=M.*(c3.*sinh(M.*y)+c4.*cosh(M.*y))-((2.*k1.*y+k2)./(M.^2));
Q=(1./M).*(c3.*sinh(M)+c4.*(cosh(M)-1))-((((M.^2)+6).*k1)./(3.*(M.^4)))-((k2+2.*k3)./(2.*(M.^2)));
k4=-(k1./(M.^2));
k5=-(k2./(M.^2));
k6=-((2.*k1+(M.^2).*k3)./(M.^4));
x3=((4.*c1.*k4)+(6.*c1.*k5)+(12.*c1.*k6)+(3.*c2.*k4)+(4.*c2.*k5)+(6.*c2.*k6))./(12);
Tb1=((c1.*c3).*(sinh(M))./M)+((c1.*c4).*(cosh(M)-1)./(M));
Tb2=((c2.*c3).*(M.*sinh(M)-(cosh(M))+1)./(M.^2));
Tb3=(((c2.*c4).*(M.*(cosh(M))-(sinh(M)))./(M.^2))+x3);
Tb=(1./Q).*(Tb1+Tb2+Tb3);
Nu0=-c2./Tb;
Nu1=c2./Tb;
S=(T+(N.*T.*T));
figure(2)
hold on;
plot(y,u, lines {i},’linewidth’,2)
xlabel(‘Y’);
ylabel(‘U’);
box on;
hold off;
fprintf (‘M=%ft u=%ft Q=%ft Tb=%ft cf0=%ft cf1=%ft Nu0=%ft Nu1=%f n ‘,M,u,Q,Tb,(t0),(t1),(Nu0),(Nu1));
endRva=[1 0.01];
for i=1:2
M= Rva (i);
lines = {‘:b’,’:g’};
lmd=1;
y=0.5;
gam=1;
N=0.0;
A=0;
B=1;
c1=(A+(B.*gam))./(1+gam);
c2=(B-A)./(1+gam);
T=c1+(c2.*y);
k1=(-N.*((A.^2)-(2.*A.*B)+(B.^2)))./((1+gam).^2);
k2=(-((2.*N.*(A.*B-(A.^2)-(A.*B.*gam)+(B.^2).*gam)+(B-A-(A.*gam)+(B.*gam)))))./((1+gam).^2);
k3=(-(N.*((A.^2)+(2.*A.*B.*gam)+(B.^2).*(gam.^2))+(A+(A.*gam)+(B.*gam)+(B.*(gam.^2)))))./((1+gam).^2);
x1=(1./(lmd.*M.*(cosh(M))+sinh(M)));
x2=((1-cosh(M)).*((2.*k1)+((M.^2).*k3))./(M.^4))+(k1+(k2.*(1+lmd.*(cosh(M)))))./(M.^2);
c4=x1.*x2;
c3=(lmd.*M.*c4)+((2.*k1+(M.^2).*k3)./(M.^4))-(lmd.*k2./(M.^2));
u=c3.*(cosh(M.*y))+c4.*(sinh(M.*y))-((k1.*(y.^2)+(k2.*y)+((2.*k1+(M.^2).*k3)./(M.^2))))./(M.^2);
t0=M.*c4-(k2./(M.^2));
t1=M.*(c3.*sinh(M)+c4.*cosh(M))-((2.*k1+k2)./(M.^2));
t=M.*(c3.*sinh(M.*y)+c4.*cosh(M.*y))-((2.*k1.*y+k2)./(M.^2));
Q=(1./M).*(c3.*sinh(M)+c4.*(cosh(M)-1))-((((M.^2)+6).*k1)./(3.*(M.^4)))-((k2+2.*k3)./(2.*(M.^2)));
k4=-(k1./(M.^2));
k5=-(k2./(M.^2));
k6=-((2.*k1+(M.^2).*k3)./(M.^4));
x3=((4.*c1.*k4)+(6.*c1.*k5)+(12.*c1.*k6)+(3.*c2.*k4)+(4.*c2.*k5)+(6.*c2.*k6))./(12);
Tb1=((c1.*c3).*(sinh(M))./M)+((c1.*c4).*(cosh(M)-1)./(M));
Tb2=((c2.*c3).*(M.*sinh(M)-(cosh(M))+1)./(M.^2));
Tb3=(((c2.*c4).*(M.*(cosh(M))-(sinh(M)))./(M.^2))+x3);
Tb=(1./Q).*(Tb1+Tb2+Tb3);
Nu0=-c2./Tb;
Nu1=c2./Tb;
S=(T+(N.*T.*T));
figure(2)
hold on;
plot(y,u, lines {i},’linewidth’,2)
xlabel(‘Y’);
ylabel(‘U’);
box on;
hold off;
fprintf (‘M=%ft u=%ft Q=%ft Tb=%ft cf0=%ft cf1=%ft Nu0=%ft Nu1=%f n ‘,M,u,Q,Tb,(t0),(t1),(Nu0),(Nu1));
end Rva=[1 0.01];
for i=1:2
M= Rva (i);
lines = {‘:b’,’:g’};
lmd=1;
y=0.5;
gam=1;
N=0.0;
A=0;
B=1;
c1=(A+(B.*gam))./(1+gam);
c2=(B-A)./(1+gam);
T=c1+(c2.*y);
k1=(-N.*((A.^2)-(2.*A.*B)+(B.^2)))./((1+gam).^2);
k2=(-((2.*N.*(A.*B-(A.^2)-(A.*B.*gam)+(B.^2).*gam)+(B-A-(A.*gam)+(B.*gam)))))./((1+gam).^2);
k3=(-(N.*((A.^2)+(2.*A.*B.*gam)+(B.^2).*(gam.^2))+(A+(A.*gam)+(B.*gam)+(B.*(gam.^2)))))./((1+gam).^2);
x1=(1./(lmd.*M.*(cosh(M))+sinh(M)));
x2=((1-cosh(M)).*((2.*k1)+((M.^2).*k3))./(M.^4))+(k1+(k2.*(1+lmd.*(cosh(M)))))./(M.^2);
c4=x1.*x2;
c3=(lmd.*M.*c4)+((2.*k1+(M.^2).*k3)./(M.^4))-(lmd.*k2./(M.^2));
u=c3.*(cosh(M.*y))+c4.*(sinh(M.*y))-((k1.*(y.^2)+(k2.*y)+((2.*k1+(M.^2).*k3)./(M.^2))))./(M.^2);
t0=M.*c4-(k2./(M.^2));
t1=M.*(c3.*sinh(M)+c4.*cosh(M))-((2.*k1+k2)./(M.^2));
t=M.*(c3.*sinh(M.*y)+c4.*cosh(M.*y))-((2.*k1.*y+k2)./(M.^2));
Q=(1./M).*(c3.*sinh(M)+c4.*(cosh(M)-1))-((((M.^2)+6).*k1)./(3.*(M.^4)))-((k2+2.*k3)./(2.*(M.^2)));
k4=-(k1./(M.^2));
k5=-(k2./(M.^2));
k6=-((2.*k1+(M.^2).*k3)./(M.^4));
x3=((4.*c1.*k4)+(6.*c1.*k5)+(12.*c1.*k6)+(3.*c2.*k4)+(4.*c2.*k5)+(6.*c2.*k6))./(12);
Tb1=((c1.*c3).*(sinh(M))./M)+((c1.*c4).*(cosh(M)-1)./(M));
Tb2=((c2.*c3).*(M.*sinh(M)-(cosh(M))+1)./(M.^2));
Tb3=(((c2.*c4).*(M.*(cosh(M))-(sinh(M)))./(M.^2))+x3);
Tb=(1./Q).*(Tb1+Tb2+Tb3);
Nu0=-c2./Tb;
Nu1=c2./Tb;
S=(T+(N.*T.*T));
figure(2)
hold on;
plot(y,u, lines {i},’linewidth’,2)
xlabel(‘Y’);
ylabel(‘U’);
box on;
hold off;
fprintf (‘M=%ft u=%ft Q=%ft Tb=%ft cf0=%ft cf1=%ft Nu0=%ft Nu1=%f n ‘,M,u,Q,Tb,(t0),(t1),(Nu0),(Nu1));
end differential equation, streamlines MATLAB Answers — New Questions