フィルターのクリア

draw a line with known slope and one set of coordinates

8 ビュー (過去 30 日間)
KLR
KLR 2020 年 7 月 7 日
回答済み: dpb 2020 年 7 月 7 日
I know the coordinates of the starting position of the line (x1,y1). I also know the angle the line makes how to find the second set of coordinates and plot the line?

採用された回答

dpb
dpb 2020 年 7 月 7 日
m=tan(theta); % tan()=y/x --> slope
b=y1-m*x1; % intercept to pass thru x1,y1 at given slope.
coeff=[m b]; % coefficient array for convenience
yh=polyval(coeff,[x1 xEnd]); % evaluate line from x1 to some end point of choice

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by