Dynamic spectra for 1000 files
1 view (last 30 days)
Show older comments
Pritpal Kaur
on 6 Mar 2020
Commented: Pritpal Kaur
on 7 Mar 2020
Hello,
I would like to make dynamic spectra of two columns data. 1st column has frequency and other column has power from spectrum analyzer in dBm units.
Dynamic spectra is defined as intensity as a function of time and frequency. Here time is two and half hours of observation. I have 1000 .txt files then how
to create dynamic spectra ?
0 Comments
Accepted Answer
Bjorn Gustavsson
on 6 Mar 2020
Edited: Bjorn Gustavsson
on 6 Mar 2020
It is unclear what data you have in your files. Is it frquency and power-spectra from spectrum analyzer? If so then you can simply merge them together in order-of-time:
dFiles = dir('*.txt');
for i1 = numel(dFiles):-1:1
curr_data = load(dFiles(i1).name);
P(1:numel(curr_data)/2,i1) = curr_data(:,2);
F(1:numel(curr_data)/2,i1) = curr_data(:,1);
T(i1) = 2.5*3600*(i1-1);
end
If you on the other hand have the actual signal samples saved for a time-span of 2.5 hours split into 1000 files then just merge them together and calculate the spectrogram with for example the spectrogram function.
HTH
More Answers (0)
See Also
Categories
Find more on Spectral Measurements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!