Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
How can I obtain the energy from spectrogram?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I'm trying to get the spectral energy density of the signals, which are ultrasound pulses, inside the processing I'm carrying out a method to find the energy in a frequency band, we use the matlab spectrogram function that performs an analysis in time-frequency and one of its outputs is the PSD.
According to my readings when integrating the PSD in a frequency band of interest, theoretically, I get the energy, spectrogram calculates the DTFT for each one of the windows in which one divides the signal, then the PSD is calculated for each one of those windows and for a range of frequencies that are within a band of interest, if I am interested in a band say 40 kHz I assign that frequency to the function, however when reviewing the matrix of the PSD for the time windows and the frequencies that I passed as arguments to the function, the range in which the frequencies obtained in the spectrogram are, is much different than the value that I assigned to the function, so I do not understand how to integrate the PSD to obtain the energy in the band that I want. This is the section of code that I use:
x=data{1,1};
fs=1e6;
f=40*10^3;
ns=length(x);
refreq=fs/nfft;
wl=length(W);
W=window_1; %hann window, length: 250
noverlap=0.9.*wl;
Freqbins = (ns-noverlap)/(wl-noverlap);
[s,f,t,ps,fc,tc] =
spectrogram(x,W,noverlap,f,fs,'reasigned','psd');
I am somewhat confused because I have read the matlab documentation for the spectrogram function and some argument of the function may not be correct, I hope someone can guide me.
0 comentarios
Respuestas (0)
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!