www.gusucode.com > wavelet 源码程序 matlab案例代码 > wavelet/LinearityOfWTMMCoeffsForMonofractalExample.m

    %% Linearity of Scaling Exponents for Monofractal Signal
% Confirm that for a monofractal signal, the scaling exponents 
% are a linear function of the moments. For multifractal signals, the 
% exponents are a nonlinear function of the moments.
%%
% Load a signal that contains two time series, each with 8000 samples.
% |Ts1| is a multifractal signal and |Ts2| is a monofractal fractional 
% Brownian signal. Obtain the exponents using |wtmm|.
load RWdata; 
[hexp1,tauq1] = wtmm(Ts1);
[hexp2,tauq2] = wtmm(Ts2);
%%
% Plot the scaling exponents. 
expplot = plot(-2:0.1:2,tauq2,'b-o',-2:0.1:2,tauq1,'r-^');
grid on;
expplot(1).MarkerFaceColor = 'b';
expplot(2).MarkerFaceColor = 'r';
legend('Ts2-Monofractal','Ts1-Multifractal','Location','SouthEast');
title('Monofractal vs. Multifractal Scaling Exponents');
xlabel('Qth Moment');
ylabel('Scaling Exponents');
%%
% |Ts2|, which is the monofractal signal, is a linear function. |Ts1|, the
% multifractal signal, is not linear.