FFT of a Superposition signal
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I have a superposition signal waveform, which I am importing as a txt file, attaching the file. I would like to get the frequency components of the signal. This should be an easy code with just calling the fft function. But I am not able to see the frequency points. May be I am missing something. Could someone please help?
clc;close all
x1 = importdata('Plot-try-matlab-1.txt');
time = x1(:,1);
N = length(x1);
n = 2^nextpow2(N);
Y = fft(x1,n);
plot(Y);
Thanks for the help.
0 comentarios
Respuestas (1)
Benjamin Thompson
el 11 de Ag. de 2022
Editada: Benjamin Thompson
el 11 de Ag. de 2022
Try this, and see this article on usage of the FFT to understand how to interpret the results and assign results to frequencies. Your time data does not make sense so I just plot results on a range of 1:n for frequency.
clc;close all
x1 = importdata('Plot-try-matlab-1.txt');
time = x1(:,1);
N = length(x1);
n = 2^nextpow2(N);
Y = fft(x1(:,2),n);
plot(1:n, abs(Y));
https://www.mathworks.com/help/matlab/math/fourier-transforms.html
https://www.mathworks.com/help/matlab/math/fourier-transforms.html
0 comentarios
Ver también
Categorías
Más información sobre Fourier Analysis and Filtering en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!