How to generate a sine signal in which initially frequency increases linearly, then remains constant for some time and again decreases linearly.

조회 수: 3 (최근 30일)
How to generate a sine signal in which initially frequency increases linearly then remains constant for some time and again decreases linearly i.e, for 1st segment its frequency increases linearly from 0HZ – 100 HZ for t1=10 sec. Then the frequency remains constant in the 2nd segment for at 100 Hz at t2=50 sec and for the 3rd segment the frequency decreases linearly from 100Hz to 0 Hz for t3=10 sec.

채택된 답변

Pawel Jastrzebski
Pawel Jastrzebski 2018년 7월 24일
편집: Pawel Jastrzebski 2018년 7월 24일
Would it look like this:
% y = sine(2*pi*f*t)
t1 = linspace(0,10,500);
t2 = linspace(10,50,500);
t3 = linspace(50,60,500);
f1 = linspace(0,100,500);
f2 = repmat(100, [1 numel(t2)]);
f3 = fliplr(f1)
t = [t1 t2 t3];
f = [f1 f2 f3];
figure
subplot(2,1,1)
plot(t,2*pi*f.*t)
title('2*pi*f.*t')
xlabel('t');
ylabel('2*pi*f.*t')
subplot(2,1,2)
plot(t,sin(2*pi*f.*t));
title('sin(2*pi*f.*t)')
xlabel('t');
ylabel('sin(2*pi*f.*t)')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by