Afficher commentaires plus anciens
I want to make this graph. Anyone can help me for code pls. And legend gives error on this code
x=[6,7,8,9,10,11,12,13,14,15,16,17,18];
y1=[32.3, 32, 31.9, 34.4, 39.8, 44.8, 49.6, 54.4, 58.7, 62.6, 65.3, 66.2, 64.8];
y2=[32.6, 32.3, 32.2, 35.2, 41.2, 46.3, 51.3, 56, 60.4, 64.1, 66.8, 67.4, 65.6];
z=[y1;y2];
a=plotyy(x,y1,x,y2);
hold on
y3=[64, 90, 399, 662, 981, 1220, 1366, 1376, 1284, 1072, 777, 469, 221];
y4=[138.138, 138.138, 138.138, 368.368, 644.644, 690.69, 782.782, 736.736, 782.782, 690.69, 690.69, 552.552, 368.368];
u=[y3;y4];
b=plotyy(x,y3,x,y4);
hold off
title('Solar Energy')
xlabel('Time')
ylabel('Temperature')
ylabel(b(2),'Energy Rate')
legend('Collector input temperature','Collector output temperature','Radiation intensity(W/m^2)','Heat(W)'
1 commentaire
Anusha Sridharan
le 26 Déc 2018
[Answers Dev] Restored edits and attachment
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Legend dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!