Hi everyone. I am trying to plot multiple graph in Matlab. it seems that matlab over wrights the values in each loop so when i try to plot it doesn't give any results ….so how can i save the values for every loop to plot them ?? here is the code
tc=40;
te=15;
c1=137.402;
c2=4.60437;
c3=0.061652;
c4=-1.118157;
c5=-.001525;
c6=-.0109119;
c7=-.00040148;
c8=-.00026682;
c9=.000003873;
d1=1.00618;
d2=-.893222;
d3=-.01426;
d4=0.870024;
d5=-.0063397;
d6=.033889;
d7=-.00023875;
d8=-.00014746;
d9=.0000067962;
for ta=[20:5:50];
qe=c1+c2*te+c3*te^2+c4*tc+c5*tc^2+c6*te*tc+c7*te^2*tc+c8*te*tc^2+c9*te^2*tc^2;
p=d1+d2*te+d3*te^2+d4*tc+d5*tc^2+d6*te*tc+d7*te^2*tc+d8*te*tc^2+d9*te^2*tc^2;
a=1;
b=(0.54*10+6)/0.27;
c=10^2+(6*10)/0.27-qe/0.27;
te=(-b+sqrt(b^2-4*a*c))/(2*a);
qc=qe+p;
tc=(qc/9.6)+ta;
ta,qe,p,te,qc,tc,
end
plot(ta,qe,ta,p,ta,te,ta,qc,ta,tc)
Best Answer