How i can get graph in the form of line instead of points
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
E=[7840.00,22690.00,44950.00,74630.00, 111730.00];
x=[5601,10000,13000,19000,250000];
c=48000;
for i=1:5
if(E(i)<c)
plot(x(i),E(i),'-');
hold on;
else
plot(x(i),c,'-')
hold on;
end
end
0 Commenti
Risposte (1)
Guillaume
il 23 Giu 2017
By not using a loop and if statements. Simply:
plot(x, min(E, c), '-')
0 Commenti
Vedere anche
Categorie
Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!