I need help with implementing FFT in hamming window to search peak on the graph/chart (determination of the spectral phase function). At this moment I know how to mark all the peaks on my chart, and also how to load all the file from folder on one chart. And now the most important thing is to find a peak by FFT hamming window. For now the most important thing for me is just to implement this to my script or show me how to do this. When I understand this, I can modify it to search for the peak I want.
My code:
folder = 'C:\Users\an\Desktop\Materialy\';
files = dir(fullfile(folder,'*.dat'));
files_len = numel(files);
if (files_len == 0)
return;
end
figure(1);
file = fullfile(folder,files(1).name);
[lam,I] = read_spectrum(file);
lam = lam * 1e-3;
plot(lam,I);
if (files_len > 1)
hold on;
for i = 2:files_len
file = fullfile(folder,files(i).name);
[lam,I] = read_spectrum(file);
lam = lam * 1e-3;
plot(lam,I);
end
hold off;
end