draw line graphs connecting two points
Ältere Kommentare anzeigen
Hi,
I want to draw somthing like this. Can I know how to connect two points? thanks.

Antworten (1)
% Fisrt specify the coordinates
pstart = [ones(1,5); (1:5)]
pend = [ones(1,5)+5; (1:5)+9]
% plot the lines
plot([pstart(1,:); pend(1,:)], [pstart(2,:); pend(2,:)])
Kategorien
Mehr zu Networks finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
