Dynamic spectra for 1000 files
조회 수: 2 (최근 30일)
이전 댓글 표시
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
채택된 답변
Bjorn Gustavsson
2020년 3월 6일
편집: Bjorn Gustavsson
2020년 3월 6일
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spectral Measurements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!