Plotting spectrograph from spectrum analyzer data
Ältere Kommentare anzeigen
I have the following data obtained the following data from a spectrum analyzer. I need some pointers on plotting it to obtain the spectrogram as shown in this image
I have attached my data in this question. The Header contains data from the instrument (such as center frequency) and the Timedata has unsigned array of 10x131071 and Value has the value at each point of time (same size)
_________________
I tried using the following but to no avail
% Convert time_data to double and calculate the sampling frequency
dt = double(time_data(1, 2) - time_data(1, 1)); % Assuming a constant time interval
fs = 1 / dt;
% Transpose the amplitude_data matrix
amplitude_data = amplitude_data';
% Number of rows in amplitude_data
num_rows = size(amplitude_data, 1);
% Plot spectrogram for each row
for row = 1:num_rows
figure;
spectrogram(amplitude_data(row, :), hamming(256), 250, 256, fs, 'yaxis');
title(['Spectrogram for Row ', num2str(row)]);
xlabel('Time');
ylabel('Frequency');
colorbar; % Display the color scale
end
1 Kommentar
Mario Malic
am 23 Feb. 2024
Can you also include the code that loads the files please?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Multirate Signal Processing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!










