how to plot a line with angle

how to draw a line of AB and BC, with angle ABC = 30 degree. i.e BC is at 2,2, where axis x and y from 0 to 10.the length is about 2 cm for each line.thank you

 採用された回答

Image Analyst
Image Analyst 2014 年 3 月 16 日

1 投票

Once you do that elementary trigonometry to find all the points, you can use line() to draw the 2 or 3 lines to form the angle or triangle.
line([x1, x2], [y1, y2]);
But with just a single point at (2,2), you need to define the location of the other 2 points first.
Then use xlim and ylim to set up the axes limits:
xlim([0, 10]);
ylim([0, 10]);

その他の回答 (1 件)

m
m 2014 年 3 月 16 日

0 投票

thank you. i'm confusing between plot() and line(). now i get the clear picture.

カテゴリ

ヘルプ センター および File ExchangeLine Plots についてさらに検索

タグ

質問済み:

m
m
2014 年 3 月 16 日

回答済み:

m
m
2014 年 3 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by