Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
matlabで線を引きたいです。私のシナリオは x=[-400:400] のようなもので、「y」は同じ長さである必要がありますが、不規則な傾斜の連続線であり、最後にプロット コマンドをプロットに使用したいと考えています。誰でもそれを行う方法を提案できますか。
ありがとう
1 のステップでプロットすると仮定すると、次のようになります。
x1=-400:-300; x2=-300:-200; x3=-200:300; x=[x1 x2 x3];
そして、y については次のようになります。
y1=ones(1,length(x1)); y2=(-200-150)/(-200+300) (x2+300) + 150; y3=(200+200)/(300+200) (x3+200) - 200; y=[y1 y2 y3]
その後 :
plot(x,y)