how can i plot using for loop?
1 view (last 30 days)
Show older comments
plz help, i want to plot (Kc) with (ww)
if true
% code
end
clc
for Kc=1:0.1:50
Kd= 0.1;
A=Kc*(1+(2*Kd));
m=1+A;
h=10;
v= 0.5;
Po= 1*10^5;
yo= 5.5*10^-2;
TH=273+100;
TC=273+20;
N=(h*TH)/(v*Po*yo);
I=-(m/N)*(1/(A*(1+A)));
nr=0;
K=1.4;
Kreg=(1-nr)/(K-1);
H=-Kreg*(1+A+Kd);
IH=I*H;
s=IH*((TC/TH)+IH);
f=(I+0.5)^2;
T=(I+0.5)*(1+((1+s/f)^0.5))/((TC/TH)+IH);
B=Kc*((1/T)-1);
lnz=-(B/(A*(1+A)));
G=(B*(1+A+Kd))/(A*(1+A));
Tc=TC-((m*(TH/(N*Kc)))*((lnz/(T*((1/T)-1)))+(Kreg*G)));
Th=TH-((m*(TH/(N*Kc)))*((-lnz/(((1/T)-1)))-(Kreg*G)));
n=(T-1)/(T+((1-T)*H));
w=((1-(1/T))*m)/((1+2*Kd)*(1+Kc*(1+(2*Kd))));
Kc
ww=w/(1+(Kc*(1+(2*Kd))))
end
0 Comments
Answers (1)
Image Analyst
on 11 Apr 2015
In this impenetrable, uncommented, alphabet soup of a program, why can't you just call
plot(ww, Kc, 'b-')
? Is it any more complicated than that???
0 Comments
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!