필터 지우기
필터 지우기

Combined Sine wave with multiple amplitudes

조회 수: 3 (최근 30일)
Raashid Hassan
Raashid Hassan 2022년 4월 5일
답변: Davide Masiello 2022년 4월 5일

I wanna plot a sine wave,50 hz with amplitude 1.0 units for 5 cycles and then with an amplitude of 4.0 units for another 3 cycles with the same frequency !Kindly help with the code to do the same

채택된 답변

Davide Masiello
Davide Masiello 2022년 4월 5일
Do this,
f = 50;
T = 1/f;
t1 = linspace(0,5*T,1000);
wave1 = sin(2*pi*f*t1);
t2 = linspace(5*T,8*T,1000);
wave2 = 4*sin(2*pi*f*t2);
plot([t1,t2],[wave1,wave2])

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by