Plotting sine wave valley to valley

1 回表示 (過去 30 日間)
Caitlin Bemis
Caitlin Bemis 2022 年 8 月 11 日
回答済み: Star Strider 2022 年 8 月 11 日
Hello,
I am looking to create a sine wave that I can change the amount of time (or frequency) that the duration is and so that it does not start at 0. That way the line goes from valley to valley instead of mid length to mid length. Hopefully that makes sense.

採用された回答

Star Strider
Star Strider 2022 年 8 月 11 日
Perhaps something like this —
t = linspace(0, 1, 250);
freq = 5;
s = sin(2*pi*t*freq + 3*pi/2);
figure
plot(t,s)
grid
Make appropriate changes to get the result you want.
.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAI for Signals についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by