www.gusucode.com > wavelet 源码程序 matlab案例代码 > wavelet/LocalHolderExponentsForCuspSignalAndDeltaFunctionsExample.m
%% Local Holder Exponents for Cusp Signal and Delta Functions % Using a cusp signal and a signal containing delta functions, generate % their local Holder exponents. %% Cusp Signal % Load and plot a cusp signal. Note the difference between the two cusps. load cusp; plot(cusp) grid on xlabel('Sample') ylabel('Amplitude') %% % The equation for this cusp signal specifies a Holder exponent of 0.5 at % sample 241 and a Holder exponent of 0.3 at sample 803. % % |-0.2*abs(x-241)^0.5 - 0.5*abs(x-803)^0.3 + 0.00346*x + 1.34| %% % Obtain the local Holder exponents and plot the modulus maxima. wtmm(cusp,'ScalingExponent','local'); %% % The Holder exponents at samples 241 and 803 are very close to % the values specified in the cusp signal equation. The higher Holder % value at sample 241 indicates that the signal at that point is closer % to being differentiable than the signal at sample 803, which has a % smaller Holder value. %% Delta Functions % Create and plot two delta functions. x = zeros(1e3,1); x([200 500]) = 1; plot(x) grid on xlabel('Sample') ylabel('Amplitude') %% % Obtain the local Holder exponents using the default number of octaves, % which in this case is 7. Plot the modulus maxima. A delta function has a % Holder exponenent of &ndash1. wtmm(x,'ScalingExponent','local'); %% % Obtain the local Holder exponents using 5 octaves and compare the modulus % maxima plot to the plot using the default number of octaves. wtmm(x,'ScalingExponent','local','NumOctaves',5); %% % Reducing the number of scales provides more separation in frequency and % less overlap between the modulus maxima lines of the delta functions.