91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 964B
    文件類型: .m
    金幣: 1
    下載: 0 次
    發布日期: 2021-01-07
  • 語言: Matlab
  • 標簽: Matlab??

資源簡介

利用Matlab編寫的兩點確定一條直線的程序,可計算其斜率等,利用了disp()函數,是我們更容易掌握!

資源截圖

代碼片段和文件信息

function?[ka1btype]=straight_line(AB)?%?輸入,AB兩點坐標
V=B-A
a=inf;
b=inf;
type=‘undefined‘;
if?A==B
????‘The?two?points?are?the?same‘
????return
end
if?V(1)==0?&&?V(2)==0
????disp(‘Enter?two?distinct?points?next?time‘)%disp()輸出
????return
end
if?V(1)==0
????type=‘vertical‘;
elseif?V(2)==0
????type=‘horizontal‘;
else
????type=‘oblique‘;
????slope=atan2(V(2)V(1));%atan2(??)求一個點對應的角度
????s=inv([A(1)?1;B(1)?1])*[A(2)?B(

評論

共有 條評論