-2

以下のコードに示すように、非定常信号の 4 つの周波数成分が定義されています。これらの信号の周波数ドメインをプロットしようとすると、下の画像に示すように、周波数ピークが 3 つしかないグラフが表示されました。

周波数が 4 つあるのに、ピークが 3 つしかない理由を教えてください。コンポーネント。

コード:

% Time specifications:
Fs = 8000;                       % samples per second
dt = 1/Fs;                       % seconds per sample
StopTime = 2;                    % seconds
t = (0:dt:StopTime-dt);             % seconds

t1 = (0:dt:.25);
t2 = (.25:dt:.50);
t3 = (.5:dt:.75);
t4 = (.75:dt:1);

x1 = (10)*sin(2*pi*10*t1);
x2 = (10)*sin(2*pi*20*t2) + x1;
x3 = (10)*sin(2*pi*50*t3) + x2;
x4 = (10)*sin(2*pi*70*t4) + x3;

NFFT  = 2 ^ nextpow2(length(t));     % Next power of 2 from length of y
Y    = fft(x4, NFFT);
f    = Fs / 2 * linspace(0, 1, NFFT/2 + 1);
figure;
plot(f(1:200), 2 * abs( Y( 1:200) ) );

% Plot the signal versus time:
figure;
xlabel('time (in seconds)');
ylabel('Amplitude');
title('non-stationary Signal versus Time');

hold on
plot(t1,x1,'r');
plot(t2,x2,'g');
plot(t3,x3,'b');
 plot(t4,x4,'black');
  legend('x1 = (10)*sin(2*pi*15*t1) + (10)*sin(2*pi*8*t1)', 'x2 = (10)*sin(2*pi*25*t2)   
 +    
 x1', 'x3 = (10)*sin(2*pi*50*t3) + x2', 'x4 = (10)*sin(2*pi*75*t4) + x3', ...
'Location',  'SouthWest');

画像: : ここに画像の説明を入力

4

1 に答える 1