diff options
Diffstat (limited to 'macros/hilbert1.sci')
-rw-r--r-- | macros/hilbert1.sci | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/macros/hilbert1.sci b/macros/hilbert1.sci index 476c00c..8ba1821 100644 --- a/macros/hilbert1.sci +++ b/macros/hilbert1.sci @@ -1,24 +1,26 @@ -/*Calling Sequence - h = hilbert1 (f) - h = hilbert1 (f, N) - h = hilbert1 (f, N, dim) -Description - Analytic extension of real valued signal. - h = hilbert (f) computes the extension of the real valued signal f to an analytic signal. - If f is a matrix, the transformation is applied to each column. - For N-D arrays, the transformation is applied to the first non-singleton dimension. - real (h) contains the original signal f. imag (h) contains the Hilbert transform of f. - hilbert (f, N) does the same using a length N Hilbert transform. The result will also have length N. - hilbert (f, [], dim) or hilbert (f, N, dim) does the same along dimension dim. -Dependencies - fft1, ifft1, ipermute -Example - //the magnitude of the hilbert transform eliminates the carrier - t=linspace(0,10,1024); - x=5*cos(0.2*t).*sin(100*t); - plot(t,x,t,abs(hilbert(x))); - */ + function f=hilbert1(f, N ,dim ) +// Calling Sequence +// h = hilbert1 (f) +// h = hilbert1 (f, N) +// h = hilbert1 (f, N, dim) +// Description +// Analytic extension of real valued signal. +// h = hilbert (f) computes the extension of the real valued signal f to an analytic signal. +// If f is a matrix, the transformation is applied to each column. +// For N-D arrays, the transformation is applied to the first non-singleton dimension. +// real (h) contains the original signal f. imag (h) contains the Hilbert transform of f. +// hilbert (f, N) does the same using a length N Hilbert transform. The result will also have length N. +// hilbert (f, [], dim) or hilbert (f, N, dim) does the same along dimension dim. +// Dependencies +// fft1, ifft1, ipermute +// Example +// //the magnitude of the hilbert transform eliminates the carrier +// t=linspace(0,10,1024); +// x=5*cos(0.2*t).*sin(100*t); +// plot(t,x,t,abs(hilbert(x))); + + // ------ PRE: initialization and dimension shifting --------- nargin = argn(2); if (nargin<1 || nargin>3) |