marginal spectrum from histcount2
显示 更早的评论
Hello,
I'm trying to calculate marginal spectrum(Hilbert-huang spectrum), usually HHT is 1d, in my case its 2d applying for images
I'm using histcounts2 put a,b as joint distibution
% abins and bbins in logspace, not in linspace
for i=1:lenght(imf)
a=gradient(unwrap(angle(hilbert(imf))), dx, dy))); % spatial frequency
b= hilbert(imf.').';% amplitude % I'm doing only in x-direction thats across columns because there is no 2d hilbert(for moment)
[jointab(:,:,i),A,B] = histcounts2(a,b,abins,bbins, "Normalization","countdensity"); % B and C are binedges
end
total=sum(jointab,3);
E_bin=bincentre.*total.*binwidth;
E_marginal = (sum(E_bin, 2)).^2;
now I have 2d map(amplitude and spatial frequency), I want to calculate marginal spectrum(Energy vs wavenumber)
question:
1) I want to calculate amplitude weighted marginal spectrum(Energy vs wavenumber)
2) how I'm doing,
E_bin=bin centre.*total.*binwidth;
E_marginal = (sum(E_bin, 2)).^2;
is it correct normalization?
is binwidth=dB*dC or only dB?
am I missing something here,
3) is countdensity is correct normalization for logspace binwidth, if I take pdf or probability, how my normalization changes
4) how to verify final result?
Thank you, I'm looking forward to hear someone opinion, if it is not clarity, please let me know,
Regards,
KC
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Time-Frequency Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!