Tunable Q-factor multiresolution analysis
tqwtmra(___) with no output arguments plots the tunable
Q-factor wavelet MRA in a new figure. For complex-valued data, the real part is plotted in
the first color in the MATLAB® color order matrix and the imaginary part is plotted in the second color. This
syntax does not support multidimensional MRAs.
Load an ECG signal. Obtain the TQWT of the signal down to level 6 with a quality factor of 2.
load wecg wt = tqwt(wecg,QualityFactor=2,Level=6);
Obtain the tunable Q-factor MRA of the signal.
mra = tqwtmra(wt,length(wecg),QualityFactor=2);
Plot the original signal and the lowpass subband.
plot(wecg) hold on plot(mra(end,:),linewidth=2) hold off axis tight legend(["Original","Lowpass"])
Confirm the sum along the rows of the MRA equals the original signal.
mraSum = sum(mra,1); max(abs(mraSum(:)-wecg(:)))
ans = 9.4369e-16
Load the Kobe earthquake data. Obtain the tunable Q-factor wavelet transform of the data using a quality factor of 3.
load kobe qf = 3; wt = tqwt(kobe,QualityFactor=qf);
Identify the subbands that contain at least 15% of the total energy. Note that the last element of
wt contains the lowpass subband coefficients.
EnergyBySubband = cellfun(@(x)norm(x,2)^2,wt)./norm(kobe,2)^2*100; idx15 = EnergyBySubband >= 15; bar(EnergyBySubband) title("Percent Energy By Subband") xlabel("Subband") ylabel("Percent Energy")
Obtain a multiresolution analysis and sum those MRA components corresponding to previously identified subbands.
mra = tqwtmra(wt,numel(kobe),QualityFactor=qf); ts = sum(mra(idx15,:)); plot([kobe ts']) axis tight legend("Original Data","Large Energy Components",... Location="NorthWest") xlabel("Time (s)")
wt— Tunable Q-factor wavelet transform
Tunable Q-factor wavelet transform, specified as a cell array. The elements of
wt contain the wavelet subband and lowpass coefficients.
wt is expected to be the output of
Complex Number Support: Yes
n— Original signal length
Original signal length in samples, specified as a positive integer. If the original
n is odd,
n is extended to
n+1 to obtain the MRA and the final sample is removed before
returning the MRA.
qf— Quality factor
1(default) | positive scalar
Quality factor, specified as a real-valued scalar greater than or equal to 1. If unspecified, the quality factor defaults to 1.
wt = tqwtmra(qt,2024,QualityFactor=1.5) specifies a
quality factor of 1.5.
mra— Multiresolution analysis
Multiresolution analysis, returned as an array.
mra is an
array where Ns denotes number of subbands in the tunable Q-factor
wavelet transform ordered by decreasing center frequency, N is the
number of signal samples in time, C is the number of channels, and
B is the batch size.
 Selesnick, Ivan W. “Wavelet Transform With Tunable Q-Factor.” IEEE Transactions on Signal Processing 59, no. 8 (August 2011): 3560–75. https://doi.org/10.1109/TSP.2011.2143711.
Usage notes and limitations:
Plotting is not supported.
The TQWT array
wt is the only supported input argument.