0

I'm trying to implement an algorithm which has been described in a paper. It deals with accelerometer data which has to be filtered and differentiated. My input is a vector (1 column, multiple rows).

As described here

The vector has to differentiated using a Gaussian CWT with the MatLab function cwt. Scale has to be 'scale10' and wavelet 'gaus1'.

When I try to implement the instructions in MatLab, I type the following:

    dudx=cwt(vector,'scale10','gaus1');        

This is the error I get:

    Undefined function 'sqrt' for input arguments of type 'char'.

    Error in cwt (line 278)
    coefs(ind,:) = -sqrt(a)*wkeep1(diff(wconv1(ySIG,f)),lenSIG);

As it should actually work with the input, I've really no idea what I could change. I also went through the mathworks pages from cwt and wavefun but without any solution.

I've never before used a CWT, therefore I thought that I may misunderstood something and applied the instructions wrong. Can anyone help me out on this?

1 Answers1

0

You're not using the function right. The second parameter is a vector of scales where each number is the desired scale you want. scale10 doesn't mean anything. Do you want the 10th scale?

Do this:

dudx=cwt(vector,10,'gaus1'); 

Please read the documentation here: http://www.mathworks.com/help/wavelet/ref/cwt.html

rayryeng
  • 102,964
  • 22
  • 184
  • 193