I'am trying to compute CWT(continuous wavelet transform) of a 1-D signal using the command cwt it takes 3 input arguments
- x- the input 1-D dignal.
- scales- scales is a 1-D vector with positive elements.
- wavename- it is the wavelet name which are inbuilt in matlab.
it returns a matrix having no. of rows equal to the length of scale vector. No. of columns equal to the length of input vector x.
now, I want a plot of log scale versus the coefficient plot bur while taking log scale I'am ending up getting a zero. and hence the cwt command is not responding(i.e.) it is giving an error message following is the small code.
clc;clear all
load vonkoch
vonkoch=vonkoch(1:510);
len = length(vonkoch);
scale=0.01:0.01:1;logscale=log(scale);
cw1 = cwt(vonkoch,scale,'mexh','plot');
title('Continuous Transform, absolute coefficients.')
ylabel('Scale')
[cw1,sc] = cwt(vonkoch,scale,'mexh','scal');
title('Scalogram')
ylabel('Scale')
and the error message is
Error using cwt (line 74)
Invalid Value for Scales !
Error in exmp1 (line 6)
cw1 = cwt(vonkoch,logscale,'mexh','plot');
Kindly suggest what I can do to avoid such a problem or is there any other command that can do the trick?
cwtwithlogscale. - zeeMonkeez