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 CenterFile Exchange에서 AI for Signals에 대해 자세히 알아보기

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by