How to produce line plot yline for matlab R2018a
Mostra commenti meno recenti
Hello,
My computer has R2018a old version software, I do not have time to download it.
I want to add in the graph a line in y=260, How to do and there is a special code for it?
Thanks for the helpers
yline(260,'--r','Ground'); %No work
Risposta accettata
Più risposte (2)
William
il 5 Gen 2021
It's not really necessary to plot 100 points along the line. The first and last points are enough, as in:
plot([0,1],[260,260],'--r');
1 Commento
madhan ravi
il 5 Gen 2021
Right.
madhan ravi
il 5 Gen 2021
0 voti
Funny thing , i did a file exchange a while ago for passing time, not the efficient one but gets the job done ;)
2 Commenti
madhan ravi
il 5 Gen 2021
Modificato: madhan ravi
il 5 Gen 2021
start_point = -260/2;
end_point = 260/2;
plot(260*ones(1e2, 1), linspace(start_point, end_point, 1e2), '--r')
yline(260,'--r','Ground'); %No work
Categorie
Scopri di più su 2-D and 3-D Plots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


