sloution for my question
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
hamed mohammadi
am 13 Jan. 2020
Beantwortet: Bhaskar R
am 13 Jan. 2020
we want to sample the signal { X(t)=sin(2
ft) } at frecuncy
=100 , for f consider the following the three different values , f=20 , 80 ,120 ,take the sampled signal and drow the plot of fourier transform.
0 Kommentare
Akzeptierte Antwort
Bhaskar R
am 13 Jan. 2020
f = [20, 80, 120]; % your frequencies
fs = 100; % sampling frequency
t = 0:1/fs:1-1/fs; % time
A = 1; % amplitude here assumed as 1
for ii = 1:length(f)
figure(ii)
X = A*sin(2*pi*f(ii)*t);
ft = abs(fft(X));
subplot(211), plot(t, X), title(['Signal of frequency: ', num2str(f(ii))]);grid on
subplot(212), plot(ft), title(['FFT of Signal : ', num2str(f(ii))]);grid on
end
% note: not tested
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Fourier Analysis and Filtering finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!