To find FFT, lowppass, rms, psd, ps and peak plot them

32 views (last 30 days)
a= load('example.txt');
Fs= 500000;
T= 1/Fs;
L= 500000;
NFFT = 2^nextpow2(L)
Y= abs(fft(a,NFFT))/L;
f=Fs/2*linspace(0,1,NFFT/2+1)
plot (Y)
and to find for this kind of data for each coloumn need to find FFT,power spectral density, Power spectrum,RMS,Peak and lowpass it to 20kHz. and plot all. please help me in this.

Answers (1)

vidyesh
vidyesh on 29 Dec 2023
Edited: vidyesh on 29 Dec 2023
Hello Solleti,
I understand you want to analyze the data in "example.txt" for column-wise Fast Fourier Transform (FFT), power spectral density (PSD), power spectrum, root mean square (RMS), and peak values. It can be done using MATLAB's built-in functions.
The 'fft' function is designed to compute the FFT and allows for the dimension to be specified, enabling the operation to be performed across columns. For RMS calculations, the 'rms' function can be utilized, which also accepts a dimension parameter to control the calculation across the desired axis of the data set.
When estimating the power spectral density, the 'pwelch' function is typically employed, and the 'bandpower' function can be used to compute the power spectrum. Both functions are capable of processing the data column by column. Peak values within each column can be determined using the 'findpeaks' function.
For detailed information on these functions, refer the following MATLAB documentation resources:
Hope this answer helps.

Community Treasure Hunt

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

Start Hunting!