Question

I googled it...

And all i found was how to plot a line that crosses two points, what i need is Segment (Line that crosses two points A(x1, y1) and B(x2, y2) but limited with those two points) if somebody can give me a function that does that, i will thankful.

enter image description here

Was it helpful?

Solution

I was able to do what you wanted using a simple plot command.

A = [6,3];
B = [2,4];
plot(A,B);
axis([0,10,0,5]);

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top