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