create a line between two points on an already made plot
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Dimitris Arapidis
am 5 Sep. 2013
Beantwortet: Abhishekkumar Shingala
am 29 Dez. 2020
I have matrices x and y and make a plot with them. x=[0,...,85.8024]; (100 numbers) y=[0.8736,...,1.2157];(100 numbers) figure plot(x,y)
i want to create a line from A=(0,0.8736) to B=(85.8024,1.2157) on the same plot (red color).
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 5 Sep. 2013
add
hold on
plot([0 85.8024],[0.8736 1.2157],'r')
2 Kommentare
Adam Fitchett
am 23 Okt. 2019
Bearbeitet: Adam Fitchett
am 23 Okt. 2019
Hi, I know this is a long time after the reply was written, but...
I tried this method and it drew the line between the two points, but after the second point the line veers at a seemingly random angle and then goes off into the distance. How do you draw the line so that it is just between the two points and doesn’t carry on after?
Weitere Antworten (1)
Abhishekkumar Shingala
am 29 Dez. 2020
Can we create smooth line (curve) between two points?
0 Kommentare
Siehe auch
Kategorien
Mehr zu Annotations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!