algorithm of envelope function 'peak' option
5 ビュー (過去 30 日間)
古いコメントを表示
Hello,
The description says, 'The envelopes are determined using spline interpolation over local maxima separated by at least np samples.'
I'm wondering that what order is used in the spline interpolation and also how the local maxima are calculated, separated by 'at least' np samples.
If I can, I would like to know the algorithm too.
Thank you.
0 件のコメント
採用された回答
Walter Roberson
2025 年 1 月 24 日
The local maxima are found using findpeaks() with the 'MinPeakDistance' option
spline interpolation is done using interp1() with the 'spline' option. interp1 defines
"Requires at least 4 points, falling back to linear or quadratic interpolation if 2 or 3 points are supplied, respectively" which implies that it is normally cubic spline.
2 件のコメント
Walter Roberson
2025 年 2 月 7 日
Sometimes you can just (for example)
edit envelope
It happens that source code for envelope is available.
Sometimes you need to use something like
which envelope(1:10, 2, 'peak')
in order to find out which specific method is being selected when envelope(1:10, 2, 'peak') is being called. After you which() has produced an answer, you can edit the method indicated.
But sometimes you encounter situations such as
which dictionary
that will reply back
dictionary is a built-in method % dictionary constructor
and if you encounter such a situation, you will be unable to view the source code, as it is written in C++ or C or FORTRAN and is not available.
Occasionally you will encounter code being implemented in .p files. There is (deliberately) no documented method of viewing .p files.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!