Blank figures using plot
Show older comments
I am running the following code and when the figures pop-up, they are blank without any lines.
I have tried running the Matlab in the software mode, thinking that the problem is in the OpenGL, but nothing changed.
So the error must be in the code , but I cannot figure out where. I appreacate any help on this, as I am stuck..
c1=3.74*10^8;
c2=1.44*10^4;
T1=30;
T2=90;
T3=120;
a1=0;
a2=0;
a3=0;
max1=0;
max2=0;
max3=0;
figure(1);
for a=0:0.01:300
M=c1/((a^5)*(exp(c2/(a*T1))-1));
plot(a,M,'b')
if M>max3
max3=M; a3=a;
end
hold on
end
figure(2);
for a=0:0.01:80
M=c1/((a^5)*(exp(c2/(a*T2))-1));
plot(a,M,'r')
if M>max2
max2=M; a2=a;
end
hold on
end
figure(3);
for a=0:0.01:80
M=c1/((a^5)*(exp(c2/(a*T3))-1));
plot(a,M,'g')
if M>max1
max1=M; a1=a;
end
hold on
end
Accepted Answer
More Answers (0)
Categories
Find more on Graphics Performance 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!