How do I produce a plot as a line, not just single points?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Warren Duke
le 6 Déc 2019
Commenté : Warren Duke
le 6 Déc 2019
When I use the following code, the graph plots correctly, as single points.
figure;
hold on;
deltaH=-20;
R=0.001987;
T1=305;
Kc1=1000;
for T=300:10:600;
Kc=Kc1*exp(-(deltaH/R)*((1./T)-(1/T1)));
X=(4-sqrt(4+48/Kc))/(2-8/Kc);
plot(X,T,'.','color','b') %plot of equilibrium conversion vs temperature
end
However, if I replace:
'.' with '-.'
the graph does not plot as a line, instead an empty plot is produced. How can I fix this?
0 commentaires
Réponse acceptée
JESUS DAVID ARIZA ROYETH
le 6 Déc 2019
solution:
figure;
%hold on;
deltaH=-20;
R=0.001987;
T1=305;
Kc1=1000;
T=300:10:600;
Kc=Kc1.*exp(-(deltaH/R).*((1./T)-(1./T1)));
X=(4-sqrt(4+48./Kc))./(2-8./Kc);
plot(X,T,'-*','color','b') %plot of equilibrium conversion vs temperature
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!