前回の続きです。下記式で
書き方
R言語での書き方は以下の通りです。
1 2 3 4 5 6 7 8 9 10 11 12 | t=seq(0, 2*pi, length=300) svg("freq.svg", width=5, height=12) par(mfcol=c(4,2)) plot(sin(t), sin(t+pi/2), type="l", asp=1, col=2, lwd=2, main="a:b=1:1, c=90°") plot(sin(t), sin(2*t+pi/2), type="l", asp=1, col=2, lwd=2, main="a:b=1:2, c=90°") plot(sin(t), sin(3*t+pi/2), type="l", asp=1, col=2, lwd=2, main="a:b=1:3, c=90°") plot(sin(t), sin(4*t+pi/2), type="l", asp=1, col=2, lwd=2, main="a:b=1:4, c=90°") plot(sin(2*t), sin(3*t+pi/2), type="l", asp=1, col=2, lwd=2, main="a:b=2:3, c=90°") plot(sin(3*t), sin(5*t+pi/2), type="l", asp=1, col=2, lwd=2, main="a:b=3:5, c=90°") plot(sin(5*t), sin(7*t+pi/2), type="l", asp=1, col=2, lwd=2, main="a:b=5:7, c=90°") plot(sin(5*t), sin(7*t+pi/4), type="l", asp=1, col=2, lwd=2, main="a:b=5:7, c=45°") dev.off() |
実行結果を以下に示します。
0 件のコメント:
コメントを投稿