summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/detrend1.sci12
-rw-r--r--macros/diffpara.sci33
-rw-r--r--macros/durbinlevinson.sci14
-rw-r--r--macros/fftshift1.sci12
-rw-r--r--macros/fractdiff.sci11
-rw-r--r--macros/freqs.sci2
-rw-r--r--macros/hamming.sci14
-rw-r--r--macros/hanning.sci1
-rw-r--r--macros/ifftshift1.sci12
-rw-r--r--macros/ifwht.sci23
-rw-r--r--macros/libbin6584 -> 6318 bytes
-rw-r--r--macros/names7
-rw-r--r--macros/remez1.sci2
13 files changed, 140 insertions, 3 deletions
diff --git a/macros/detrend1.sci b/macros/detrend1.sci
new file mode 100644
index 0000000..b9929f4
--- /dev/null
+++ b/macros/detrend1.sci
@@ -0,0 +1,12 @@
+function y = detrend1(x, varargin)
+ rhs= argn(2);
+ if(rhs<1 | rhs> 2)
+ error("Wrong number of input arguments");
+ end
+ select(rhs)
+ case 1 then
+ y= callOctave("detrend", x);
+ case 2 then
+ y= callOctave("detrend", x , varargin(1));
+ end
+endfunction
diff --git a/macros/diffpara.sci b/macros/diffpara.sci
new file mode 100644
index 0000000..3f9e2d9
--- /dev/null
+++ b/macros/diffpara.sci
@@ -0,0 +1,33 @@
+function [D,DD] = diffpara(X,varargin)
+ lhs= argn(1);
+ rhs= argn(2);
+ if(rhs <1 | rhs> 3)
+ error("Wrong number of input parameters");
+ end
+ if(lhs<1 | lhs>2)
+ error("Wrong number of output parameters");
+ end
+ select(rhs)
+ case 1 then
+ select(lhs)
+ case 1 then
+ D= diffpara(X);
+ case 2 then
+ [D, DD]= diffpara(X);
+ end
+ case 2 then
+ select(lhs)
+ case 1 then
+ D= diffpara(X, varargin(1));
+ case 2 then
+ [D, DD]= diffpara(X, varargin(1));
+ end
+ case 3 then
+ select(lhs)
+ case 1 then
+ D= diffpara(X, varargin(1), varargin(2));
+ case 2 then
+ [D, DD]= diffpara(X, varargin(1), varargin(2));
+ end
+ end
+endfunction
diff --git a/macros/durbinlevinson.sci b/macros/durbinlevinson.sci
new file mode 100644
index 0000000..cd56e48
--- /dev/null
+++ b/macros/durbinlevinson.sci
@@ -0,0 +1,14 @@
+function y= durbinlevinson(C, varargin)
+ rhs=argn(2);
+ if(rhs<1 | rhs>3)
+ error("Wrong number of input arguments");
+ end
+ select(rhs)
+ case 1 then
+ y=callOctave("durbinlevinson",C);
+ case 2 then
+ y=callOctave("durbinlevinson",C, varargin(1));
+ case 3 then
+ y=callOctave("durbinlevinson",C, varargin(1), varargin(2));
+ end
+endfunction \ No newline at end of file
diff --git a/macros/fftshift1.sci b/macros/fftshift1.sci
new file mode 100644
index 0000000..2928850
--- /dev/null
+++ b/macros/fftshift1.sci
@@ -0,0 +1,12 @@
+function y= fftshift1(X,DIM)
+ rhs= argn(2);
+ if(rhs <1 | rhs >2)
+ error('Wrong number of Input arguments');
+ end
+ select(rhs)
+ case 1 then
+ y=callOctave("fftshift",X);
+ case 2 then
+ y=callOctave("fftshift",X,DIM);
+ end
+endfunction \ No newline at end of file
diff --git a/macros/fractdiff.sci b/macros/fractdiff.sci
new file mode 100644
index 0000000..1731dc1
--- /dev/null
+++ b/macros/fractdiff.sci
@@ -0,0 +1,11 @@
+function y= fractdiff(x,d)
+ funcprot(0);
+ rhs= argn(2);
+ if(rhs < 2 | rhs >2)
+ error("Wrong number of input arguments");
+ end
+ select(rhs)
+ case 2 then
+ y= callOctave("fractdiff",x,d);
+ end
+endfunction \ No newline at end of file
diff --git a/macros/freqs.sci b/macros/freqs.sci
index 88773fe..05dd294 100644
--- a/macros/freqs.sci
+++ b/macros/freqs.sci
@@ -24,6 +24,6 @@ end
select (rhs)
case 3 then
- y = callOctave("freqs",b, a, w)
+ h = callOctave("freqs",b, a, w)
end
endfunction
diff --git a/macros/hamming.sci b/macros/hamming.sci
new file mode 100644
index 0000000..6fa9a12
--- /dev/null
+++ b/macros/hamming.sci
@@ -0,0 +1,14 @@
+function y = hamming(m, varargin)
+funcprot(0);
+rhs= argn(2);
+if(rhs <1 | rhs>2)
+error("Wrong number of Input parameters");
+end
+
+select(rhs)
+ case 1 then
+ y= callOctave("hamming", m);
+ case 2 then
+ y= callOctave("hamming", m , varargin(1));
+end
+endfunction
diff --git a/macros/hanning.sci b/macros/hanning.sci
index 85860c8..d90faf2 100644
--- a/macros/hanning.sci
+++ b/macros/hanning.sci
@@ -1,4 +1,5 @@
function y = hanning(m, varargin)
+
funcprot(0);
rhs= argn(2);
diff --git a/macros/ifftshift1.sci b/macros/ifftshift1.sci
new file mode 100644
index 0000000..6c5ae8e
--- /dev/null
+++ b/macros/ifftshift1.sci
@@ -0,0 +1,12 @@
+function y= ifftshift1(X,DIM)
+ rhs= argn(2);
+ if(rhs <1 | rhs >2)
+ error('Wrong number of Input arguments');
+ end
+ select(rhs)
+ case 1 then
+ y=callOctave("ifftshift",X);
+ case 2 then
+ y=callOctave("ifftshift",X,DIM);
+ end
+endfunction \ No newline at end of file
diff --git a/macros/ifwht.sci b/macros/ifwht.sci
index 163c032..c1517ac 100644
--- a/macros/ifwht.sci
+++ b/macros/ifwht.sci
@@ -1,4 +1,27 @@
function y= ifwht(x, varargin)
+// Compute the inverse Walsh-Hadamard transform of x using the Fast Walsh-Hadamard Transform (FWHT) algorithm
+// Calling Sequence
+// ifwht (x)
+// ifwht (x, n)
+// ifwht (x, n, order)
+//Parameters
+//x: real or complex valued scalar or vector
+//n: Input is truncated or extended to have a length of n
+//order: Specifies the order in which the returned inverse Walsh-Hadamard transform
+//Description
+//Compute the inverse Walsh-Hadamard transform of x using the Fast Walsh-Hadamard Transform (FWHT) algorithm. If the input is a matrix, the inverse FWHT is calculated along the columns of x.
+//The number of elements of x must be a power of 2; if not, the input will be extended and filled with zeros. If a second argument is given, the input is truncated or extended to have length n.
+//The third argument specifies the order in which the returned inverse Walsh-Hadamard transform coefficients should be arranged. The order may be any of the following strings:
+//
+//"sequency"
+//The coefficients are returned in sequency order. This is the default if order is not given.
+//
+//"hadamard"
+//The coefficients are returned in Hadamard order.
+//
+//"dyadic"
+//The coefficients are returned in Gray code order.
+
funcprot(0);
rhs= argn(2);
diff --git a/macros/lib b/macros/lib
index 5bec6b5..d265058 100644
--- a/macros/lib
+++ b/macros/lib
Binary files differ
diff --git a/macros/names b/macros/names
index 06ad552..c6a8d88 100644
--- a/macros/names
+++ b/macros/names
@@ -45,10 +45,13 @@ db
db2pow
dctmtx
decimate
+detrend1
dftmtx
+diffpara
diric
downsample
dst1
+durbinlevinson
dutycycle
dwt
ellip
@@ -75,6 +78,7 @@ firpmord
firtype
flattopwin
fracshift
+fractdiff
freqs
fwhm
fwhmjlt
@@ -86,6 +90,7 @@ gausswin
gmonopuls
goertzel
grpdelay
+hamming
hann
hanning
helperHarmonicDistortionAmplifier
@@ -97,7 +102,7 @@ idct2
idst1
ifft
ifft2
-ifftn
+ifftshift1
ifht
ifwht
iirlp2mb
diff --git a/macros/remez1.sci b/macros/remez1.sci
index 0400d90..d9cfd29 100644
--- a/macros/remez1.sci
+++ b/macros/remez1.sci
@@ -13,7 +13,7 @@ function b = remez1(n,f,a, varargin)
//ftype:is "bandpass", "hilbert" or "differentiator"
//griddensity:determines how accurately the filter will be constructed. The minimum value is 16, but higher numbers are slower to compute.
//Description
-//Frequency is in the range (0, 1), with 1 being the Nyquist frequency.
+// Frequency is in the range (0, 1), with 1 being the Nyquist frequency.
funcprot(0);
rhs= argn(2);