フィルターのクリア

Help me sketch the sprectrum of this signal.

1 回表示 (過去 30 日間)
Paul
Paul 2013 年 10 月 17 日
回答済み: Paul 2013 年 10 月 18 日
Hi there,
I am really stuggling with two things:
First I would like to sketch the spectrum of this signal:
y(t) = cos(760*pi*t)*(4+3*cos(20*pi*t))
I would like the magnitude plot and the phase plot. I have been trying the following to no avail....
%%Time specifications:
Fs = 1000; % samples per second
dt = 1/Fs; % seconds per sample
StopTime = 1; % seconds
t = (0:dt:StopTime-dt)';
N = size(t,1);
%%Sine wave:
x = (cos(760*pi*t)).*(4+3*cos(20*pi*t));
%%Fourier Transform:
X = fftshift(fft(x));
%%Frequency specifications:
dF = Fs/N; % hertz
f = -Fs/2:dF:Fs/2-dF; % hertz
%%Plot the spectrum:
figure;
plot(f,abs(X)/N);
xlabel('Frequency (in hertz)');
title('Magnitude Response');
My second issue is very similar: Sketch the spectrum ( BOTH REAL AND IMAGINERY PARTS ) for:
x(t)=(10*cos(1000*pi*t+pi/6)) + (7*cos(500*pi*t-pi/3)) - (4cos(1500*pi*t))
I appreciate everyone's help. Best regards Paul

回答 (2 件)

Nishitha Ayyalapu
Nishitha Ayyalapu 2013 年 10 月 17 日
doc angle
doc real
doc imag
1.) For Phase Respone
plot(f,angle(X));
2.) To plot real and imaginary parts
plot(f,real(X))
plot(f,imag(X))
  1 件のコメント
Paul
Paul 2013 年 10 月 18 日
I'm still stuggling to get this to work...
From what I beleive the phase diagram and magnitude diagram should both have lines coming up or down from the x axis.
I can't get this to work.
Any help please

サインインしてコメントする。


Paul
Paul 2013 年 10 月 18 日
I still can't get this to work. Any input?

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by