Performing Haar Wavelet Transform on signal consists of 1000000X1 matrix array
1 次查看(过去 30 天)
显示 更早的评论
Greetings,
I am required to perform Haar wavelet transform for a signal consists of 1000000x1 matrix array data. I'm having difficulties to use the scaling function and keep getting errors as I don't know what is the best scaling function to use for 1000000 data. Attached below is the coding for Haar wavelet which I found from several references.
%assuming InpSig = data (which consists of 1000000x1 array)
Fs = 50000;
N = length(InpSig); %number of data points
freqRes = Fs/N; %frequency resolution
freqAxisLab = freqRes*[0:N-1]; %calculate the labels for the frequency axis
fc = centfrq('haar',1); %scaling function for haar is calculated based on central frequency and level of iteration
freqrange = [1 freqAxisLab];
scalerange = fc./(freqrange*(1/Fs));
scales = scalerange(end):0.05:scalerange(1);%scalerange is the initial value:steps of the scale:end value of the scale
inpSigWAV = cwt(InpSig,scales,'haar','plot'); %CWT calculation
cwt(InpSig, scales,'haar','plot');
figure
plot(freqAxisLab, inpSigWAV,'b')
I was wondering whether my Haar wavelet coding is correct or not? Thank you in advance.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Discrete Multiresolution Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!