Hi, I have the following signal, f(t) = sin(t), -(pi/2)<= t <= (pi/2), what is the code to plot it for three whole periods? Thank you for the help!

1 件のコメント

Jimmy W
Jimmy W 2017 年 4 月 10 日
編集済み: Walter Roberson 2017 年 4 月 10 日
Basically I can only see one cycle after I plot it using these codes:
clc
clear all
x = linspace(-pi/2 , pi/2);
y = abs(sin(x));
plot(x,y);

サインインしてコメントする。

 採用された回答

Walter Roberson
Walter Roberson 2017 年 4 月 10 日

0 投票

You defined -(pi/2)<= t <= (pi/2) . Your function does not have a definition outside of that one period, so it is not meaningful to plot it for multiple periods.
You could extend your definition:
x = linspace(-pi/2 , 5*pi/2);

1 件のコメント

Jimmy W
Jimmy W 2017 年 4 月 10 日
Thank you

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

タグ

質問済み:

2017 年 4 月 10 日

コメント済み:

2017 年 4 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by