mapping frequencies to scales
2 views (last 30 days)
Show older comments
I have found function that map scales to frequencies as scal2frq, but is there a way to map the frequencies to scales, I have try to edit the scal2frq to be frq2scal, but the output scales for a certain frequencies become too slow, which cause the cwt function to give me zeros as an output, whatever the signal input was, to be more espicific I have tried to find the equivalent scales for the frequencies 1:40 Hz, and the "frq2scal" gives me the following:
0.005208333333333
0.002604166666667
0.001736111111111
0.001302083333333
.
.
.
and the code of function frq2scal is :
function a = frq2scal(f,wname,delta)
if isempty(f) , a = f; return; end
if nargin == 2, delta = 1; end
err = (min(size(f))>1) | (min(f)<eps);
if err
error(message('Wavelet:FunctionArgVal:Invalid_FrqVal'))
end
if delta <= 0
error(message('Wavelet:FunctionArgVal:Invalid_DeltaVal'))
end
% Compute pseudo-scales
a = centfrq(wname)./(f.*delta);
from my search, what Im looking seems to be weared or it's wrong, I have an idea telling me: you can't specify the scales! the scales is given by the output of the wavelet transforms! if this is true, my question will convert to: I want to study the behaviour of the signal at frequencies 1:40 Hz along with time, How to do this in wavelet transform?
0 Comments
Answers (1)
Abdul Baseer Buriro
on 17 Jun 2016
Just use/ create your own online function as I did. Find the same that used. function [scale] = AB_freq2scal(freq,wname,fs) % You can by yourself edit the program to show you the error if some thing goes inappropriate. scale=centfrq(wname)*fs./(freq); end
0 Comments
See Also
Categories
Find more on Continuous Wavelet Transforms in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!