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!