How to get the FFT of a PRC file
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Annonymous User
il 28 Ott 2015
Commentato: Annonymous User
il 28 Ott 2015
I have a code to plot information by extracting a file
% %%
clear
[filename, pathname] = uigetfile('*.raw;*.prc', 'Pick raw or processed data file');
N=str2double(filename(5:6));
% load processed file
fid = fopen([pathname filename],'r','b');
A= fread(fid,inf,'*single')';
prcdata=reshape(A,N,[])';
plot((1:size(prcdata,1))./1.16E6, prcdata (:,6))
title(strrep(filename,'_','-'))
fclose(fid);
I want to plot the FFT (fast fourier transform) of the data I plotted in the above code. I tried the following code
% %%
clear
plot(fft(1:size(prcdata,1))./1.16E6, prcdata (:,6))
and also
% %%
y= (prcdata (:,6));
z= fft(y);
plot z;
But none seem to be working I want to exchange the plot I obtained with the plot for the FFT for the same
0 Commenti
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Fourier Analysis and Filtering in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!