marginal spectrum from histcount2

조회 수: 7 (최근 30일)
Chan
Chan 2025년 2월 2일
편집: Chan 2025년 2월 2일
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개)

카테고리

Help CenterFile Exchange에서 Constants and Test Matrices에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by