문제

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

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top