summaryrefslogtreecommitdiff
path: root/macros/shanwavf.sci
diff options
context:
space:
mode:
Diffstat (limited to 'macros/shanwavf.sci')
-rw-r--r--macros/shanwavf.sci39
1 files changed, 20 insertions, 19 deletions
diff --git a/macros/shanwavf.sci b/macros/shanwavf.sci
index e088f60..3f4da44 100644
--- a/macros/shanwavf.sci
+++ b/macros/shanwavf.sci
@@ -1,23 +1,24 @@
-/*Description
- Compute the Complex Shannon wavelet.
- The complex Shannon wavelet is defined by a bandwidth parameter fb, a wavelet center frequency fc, and the expression
- psi(x) = f * b^{1/2}sinc(fb . x) e^{2 pi i f c x}
- on an n-point regular grid in the interval of lb to ub.
-Calling Sequence
- [psi, x]= shanwavf(lb, ub, n, fb, fc)
-Input Parameters
- lb, ub (Real valued scalers) : Interval endpoints lb ≤ ub, specified as a pair of real-valued scalars.
- n (Real valued integer strictly positive)` : Number of regularly spaced points in the interval [lb,ub], specified as a positive integer.
- fb : Time-decay parameter of the wavelet (bandwidth in the frequency domain). Must be a positive scalar.
- fc : Center frequency of the complex Shannon wavelet, specified as a positive scalar.
-Output Parameters
- psi : Complex Shannon wavelet evaluated on the n point regular grid x in the interval [lb,ub], returned as a 1-by-n vector.
- x : Grid where the complex Shannon wavelet is evaluated, returned as a 1-by-n vector. The sample points are evenly distributed between lb and ub.
-Examples
- 1.[a,b]=shanwavf (2,8,3,1,6)
- a = [-3.8982e-17 + 1.1457e-31i 3.8982e-17 - 8.4040e-31i -3.8982e-17 + 4.5829e-31i]
- b = [2 5 8] */
function [psi,x]=shanwavf(lb,ub,n,fb,fc)
+ // Description
+// Compute the Complex Shannon wavelet.
+// The complex Shannon wavelet is defined by a bandwidth parameter fb, a wavelet center frequency fc, and the expression
+// psi(x) = f * b^{1/2}sinc(fb . x) e^{2 pi i f c x}
+// on an n-point regular grid in the interval of lb to ub.
+// Calling Sequence
+// [psi, x]= shanwavf(lb, ub, n, fb, fc)
+// Input Parameters
+// lb, ub (Real valued scalers) : Interval endpoints lb ≤ ub, specified as a pair of real-valued scalars.
+// n (Real valued integer strictly positive)` : Number of regularly spaced points in the interval [lb,ub], specified as a positive integer.
+// fb : Time-decay parameter of the wavelet (bandwidth in the frequency domain). Must be a positive scalar.
+// fc : Center frequency of the complex Shannon wavelet, specified as a positive scalar.
+// Output Parameters
+// psi : Complex Shannon wavelet evaluated on the n point regular grid x in the interval [lb,ub], returned as a 1-by-n vector.
+// x : Grid where the complex Shannon wavelet is evaluated, returned as a 1-by-n vector. The sample points are evenly distributed between lb and ub.
+// Examples
+// 1.[a,b]=shanwavf (2,8,3,1,6)
+// a = [-3.8982e-17 + 1.1457e-31i 3.8982e-17 - 8.4040e-31i -3.8982e-17 + 4.5829e-31i]
+// b = [2 5 8]
+
funcprot(0);
rhs=argn(2);
if (rhs~=5) then