How to plot binary sine function?
古いコメントを表示
binary sine function change its amplitude to minus after a peirod
for example) T=3, Range 0~6
y=sin(t/3) for 0<=t<3
y=-sin(t/3) for 3<=t<6
it reculsively occurs for whole range
6~9, 15~18, ....
9~12, 18~21, ....
how to plot this graph?

採用された回答
その他の回答 (1 件)
David Hill
2020 年 4 月 8 日
t=0:.01:30:
y=sin(2*pi*t/3).*(-1).^floor(t/3);%I think you are missing the 2*pi
plot(t,y);
3 件のコメント
David Hill
2020 年 4 月 8 日
It works fine for me, floor is never fractional.
NoYeah
2020 年 4 月 9 日
カテゴリ
ヘルプ センター および File Exchange で MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
