Drawing line from center to other three points

5 Ansichten (letzte 30 Tage)
BlueBee77
BlueBee77 am 7 Feb. 2016
Kommentiert: Image Analyst am 7 Feb. 2016
I want to know if its possible to draw lines from a vector which has two points and is the central point to another vector that has 3 points. Bassically, it like drawing a line from center to three points. I am using Matlab.

Akzeptierte Antwort

Image Analyst
Image Analyst am 7 Feb. 2016
Bearbeitet: Image Analyst am 7 Feb. 2016
Yes. You can use line() or plot();
line([xCenter, xVector(1)], [yCenter, yVector(1)], 'Color', 'r', 'LineWidth', 2);
line([xCenter, xVector(2)], [yCenter, yVector(2)], 'Color', 'r', 'LineWidth', 2);
line([xCenter, xVector(3)], [yCenter, yVector(3)], 'Color', 'r', 'LineWidth', 2);
  2 Kommentare
BlueBee77
BlueBee77 am 7 Feb. 2016
It works. Thanks alot One thing more, how we can draw one plot on top of another. I want to draw the center point on the figure in which i extracted and plotted the boundary.
Image Analyst
Image Analyst am 7 Feb. 2016
Not sure what you mean. As long as you've set "hold on", you can just call plot().

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by