how we get to power matrix from spectrogram?
6 ビュー (過去 30 日間)
古いコメントを表示
in my project i display a spectrogram in matlab (time, frequency and power). i neet to show the power matrix. how can i do it?
this is my code:
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% Spectrogram %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Data2 is the data with a function of y = 1/(x^3) for dealing with the different strength levels of the data (the data is weak while the target is far from the radar and strong when the target is near the radar).
fs = 10000 ;
window = 512 ; % The number of sumples at every window in the spectrogram function
overlap = 500 ; % Number of overlap samples
nfft = window*8 ;
% The spectrogram function :
spectrogram(data,blackman(window),overlap,nfft,fs,'yaxis'); %display of the spectrogram
% New y axe. Converting the frequency axe to Velocity axe :
const = ( (299792458)/(2*f_transmit) ) ;%0.001595 ;
yticks( [0:1:10]/(const*1000) ) ;
yticklabels( { [0:1:10] } ) ;
% Titles for the image
xlabel('\fontsize{24} T[s]');
ylabel('\fontsize{24} V[m/s]');
set(gca,'FontSize',20); % Font of the numbers in the axes
colormap jet
and this is one of the records in spectrogram
0 件のコメント
回答 (1 件)
Binaya
2023 年 10 月 5 日
Hi Orly,
I understand your objective is to plot the power spectrum of the audio you are analyzing. Given that you already have the audio data from which a spectrogram was generated, you can directly employ the "pspectrum" function available in MATLAB to generate the power spectrum of the audio.
Please refer to the following link for “pspectrum” documentation:
I hope this addresses your question.
Regards
Binaya
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Time-Frequency Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!