How does scaleSpectrum function work?
古いコメントを表示
Dear community!
I am using continuous wavelet transform in my data analysis, and wish to quantify a time-dependent power, by integrating the wavelet power over scales (frequencies). MATLAB has a function for that - scaleSpectrum, but I find it hard to understand what exactly it computes.
What does scaleSpectrum function compute exactly - Which formula does it use? And, how does this formula change when a specific value of SpectrumType parameter is given?
Unfortunately, I couldn't find the information in the function's documentation (https://se.mathworks.com/help/wavelet/ref/cwtfilterbank.scalespectrum.html#namevaluepairs), and has no "Algorithms" section. Regarding "SpectrumType", it writes the following:
"Type of wavelet spectrum to return, specified as a comma-separated pair consisting of 'SpectrumType' and either 'power' or 'density'. If specified as 'power', the averaged sum of the scale-averaged wavelet spectrum over all scales is normalized according to the value specified in 'Normalization'. If specified as 'density', the weighted integral of the wavelet spectrum over all scales is normalized according to the value specified in 'Normalization'."
Question 1 (SpectrumType='power'): "averaged sum of the scale-averaged wavelet spectrum over all scales". So the wavelet spectrum is first scale-averaged, then it is summed, and then averaged again? What is 'spectrum', that is being scale-averaged, exactly?
Question 2 (SpectrumType='density'): "the weighted integral of the wavelet spectrum over all scales". Does this mean that the wavelet spectrum is integrated? And the integral is "weighted"? Would it be possible to clarify this?
I also couldn't find any information on google, Matlab Answers, Newsgroup, Blog, FileExchange, etc. The link to FAQ given here (https://se.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer) couldn't be opened (broken).
Thanks everyone for replies, help, and wish you all the best!
Oleg
3 件のコメント
dpb
11分 前
Have you referred to the reference papers from which it appears the function implementation was derived?
I asked an AI 'bot the Q? and it created at least a plausible sequence of steps that you would want to confirm would produce the outputs..
dpb
5分 前
Did you read the m-file to see if it is commented as to which pieces-parts came from where? MOST Mathworks developers are pretty good in that regards although it's not universal.
Failing that, try to see if the AI prescription produces a recognizable result for a sample case -- if that were so, it would be pretty-much mandatory to be what was done for at least that case.
Failing that, you can always ask for a support request from Mathworks to get further explanation of just what the input explanations really mean.
NOTA BENE: I'm not suggesting that having sufficient documentation to be able to understand the function is not important...it should be but Mathworks also tries to minimize the effort and cost of documentation given that it is a commercial venture so shortcuts are taken, understandedly.
回答 (0 件)
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!