Wavelet Covariance Transform code in Matlab
2 views (last 30 days)
Show older comments
Can someone please give a link to code/flowchart for executing Wavelet covariance transform of a function in matlab? Thanks
2 Comments
Wayne King
on 6 Mar 2015
Santino, Can you please explain in more detail what you mean by the "wavelet covariance transform" of a function. Are you sure you don't mean wavelet coherence between two functions?
Or do you mean, given some data, how do I compute the wavelet autocorrelation (autocovariance) for that data?
Answers (1)
Christiaan
on 9 Mar 2015
Dear Santino,
What you could do is to create two functions, where in the first one, the function f(z) times h is calculated and in the second file the integral is computed.
This would be the mfile to compute the function_fz_times_h:
function fz_times_h = function_fz_times_h(z,a,b)
fz = exp(z).*log(z); % <-- here write your own function inside
if (z<=b)|(z>=(b-a/2))
h=1;
elseif (z>=b)|(z>=(b+a/2))
h=-1;
else
h=0;
end
fz_times_h = fz*h;
Then in this mfile you define the covariance transform of the Haar function:
function w_f = function_wf(a,b,z_b,z_t)
w_f = 1/a*quadgk(@(z)function_fz_times_h(z,a,b),z_b,z_t);
And then in the main file you can compute directly the covariance transform of the Haar function:
clc;clear all;close all;
a = 1; b = 1;
z_b = 0; z_t = 1;
wf=function_wf(a,1,0,1)
Good luck! Christiaan
0 Comments
See Also
Categories
Find more on Discrete Multiresolution Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!