How do i generate a triangle with just inputting base length and two base angles?

1 回表示 (過去 30 日間)
Yashlin Naidoo
Yashlin Naidoo 2015 年 5 月 19 日
編集済み: Yashlin Naidoo 2015 年 5 月 19 日
This is my code below,i was able to just generate a equilateral triangle.
%Triangle=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
subplot(1,1,1)
sides = 3;
t = (1/(2*sides):1/(sides):1)*2*pi-pi/3;
b = 25;
x = b*sin(t)+5/8*xmax;
y = b*cos(t)+3/4*ymax;
fill(x,y,'black');

回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by