From 47535ab08afeb48fbb00f03e68d6ff973cf62cbd Mon Sep 17 00:00:00 2001 From: Abhinav Dronamraju Date: Fri, 10 Nov 2017 14:59:26 +0530 Subject: Functions added --- macros/hurst.bin | Bin 0 -> 1060 bytes macros/hurst.sci | 13 ++++++++++++ macros/lib | Bin 5280 -> 5688 bytes macros/names | 17 ++++++++++----- macros/remez1.bin | Bin 0 -> 2424 bytes macros/remez1.sci | 21 +++++++++++++++++++ macros/sinetone.bin | Bin 0 -> 2132 bytes macros/sinetone.sci | 20 ++++++++++++++++++ macros/sinewave.bin | Bin 0 -> 1720 bytes macros/sinewave.sci | 18 ++++++++++++++++ macros/spectral_adf.bin | Bin 0 -> 1768 bytes macros/spectral_adf.sci | 18 ++++++++++++++++ macros/spectral_xdf.bin | Bin 0 -> 1768 bytes macros/spectral_xdf.sci | 18 ++++++++++++++++ macros/spencer.bin | Bin 0 -> 1076 bytes macros/spencer.sci | 15 ++++++++++++++ macros/stft.bin | Bin 0 -> 5464 bytes macros/stft.sci | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ macros/synthesis.bin | Bin 0 -> 1256 bytes macros/synthesis.sci | 16 ++++++++++++++ macros/yulewalker.bin | Bin 0 -> 1924 bytes macros/yulewalker.sci | 24 +++++++++++++++++++++ 22 files changed, 229 insertions(+), 5 deletions(-) create mode 100644 macros/hurst.bin create mode 100644 macros/hurst.sci create mode 100644 macros/remez1.bin create mode 100644 macros/remez1.sci create mode 100644 macros/sinetone.bin create mode 100644 macros/sinetone.sci create mode 100644 macros/sinewave.bin create mode 100644 macros/sinewave.sci create mode 100644 macros/spectral_adf.bin create mode 100644 macros/spectral_adf.sci create mode 100644 macros/spectral_xdf.bin create mode 100644 macros/spectral_xdf.sci create mode 100644 macros/spencer.bin create mode 100644 macros/spencer.sci create mode 100644 macros/stft.bin create mode 100644 macros/stft.sci create mode 100644 macros/synthesis.bin create mode 100644 macros/synthesis.sci create mode 100644 macros/yulewalker.bin create mode 100644 macros/yulewalker.sci (limited to 'macros') diff --git a/macros/hurst.bin b/macros/hurst.bin new file mode 100644 index 0000000..f723804 Binary files /dev/null and b/macros/hurst.bin differ diff --git a/macros/hurst.sci b/macros/hurst.sci new file mode 100644 index 0000000..1a99f8c --- /dev/null +++ b/macros/hurst.sci @@ -0,0 +1,13 @@ +function y = hurst(x) + +funcprot(0); +rhs= argn(2); +if(rhs<1 | rhs>1) + error("Wrong number of input arguments"); +end + +select(rhs) + case 1 then + y= callOctave("hurst", x); +end +endfunction diff --git a/macros/lib b/macros/lib index fd7ba7c..483a331 100644 Binary files a/macros/lib and b/macros/lib differ diff --git a/macros/names b/macros/names index 4099cfa..79a4781 100644 --- a/macros/names +++ b/macros/names @@ -71,15 +71,13 @@ grpdelay hann helperHarmonicDistortionAmplifier hilbert1 +hurst icceps -<<<<<<< HEAD -ifht -ifwht -======= idct1 idct2 idst1 ->>>>>>> 3f916032cc0b2efdeafb838dd10e1141ead2cb27 +ifht +ifwht iirlp2mb impinvar impz @@ -150,6 +148,7 @@ rceps rcosdesign rectpuls rectwin +remez1 resample residued residuez @@ -169,6 +168,8 @@ sgolayfilt shanwavf shiftdata sigmoid_train +sinetone +sinewave slewrate sos2cell sos2ss @@ -177,11 +178,16 @@ sos2zp sosbreak sosfilt specgram +spectral_adf +spectral_xdf +spencer ss2sos statelevels +stft stmcb strips subspaceMethodsInputParser +synthesis tf2sos tf2zp tf2zpk @@ -206,6 +212,7 @@ wkeep wrev xcorr2 xcov1 +yulewalker zerocrossing zp2sos zplane diff --git a/macros/remez1.bin b/macros/remez1.bin new file mode 100644 index 0000000..43589d0 Binary files /dev/null and b/macros/remez1.bin differ diff --git a/macros/remez1.sci b/macros/remez1.sci new file mode 100644 index 0000000..aabb25e --- /dev/null +++ b/macros/remez1.sci @@ -0,0 +1,21 @@ +function b = remez1(n,f,a, varargin) + +funcprot(0); +rhs= argn(2); + +if(rhs<3 | rhs>6) +error("Wrong number of input arguments"); +end + +select(rhs) + + case 3 then + b= callOctave("remez", n,f,a); + case 4 then + b= callOctave("remez", n,f,a,varargin(1)); + case 5 then + b= callOctave("remez", n,f,a,varargin(1), varargin(2)); + case 6 then + b= callOctave("remez", n,f,a,varargin(1), varargin(2), varargin(3)); +end +endfunction diff --git a/macros/sinetone.bin b/macros/sinetone.bin new file mode 100644 index 0000000..0c7254b Binary files /dev/null and b/macros/sinetone.bin differ diff --git a/macros/sinetone.sci b/macros/sinetone.sci new file mode 100644 index 0000000..006a2e0 --- /dev/null +++ b/macros/sinetone.sci @@ -0,0 +1,20 @@ +function y= sinetone(x, varargin) + +funcprot(0); +rhs= argn(2); +if(rhs<1 | rhs>4) +error("Wrong number of input arguments") +end + +select(rhs) + case 1 then + y= callOctave("sinetone", x); + case 2 then + y= callOctave("sinetone", x , varargin(1)); + case 3 then + y= callOctave("sinetone", x , varargin(1), varargin(2)); + case 4 then + y= callOctave("sinetone", x , varargin(1), varargin(2), varargin(3)); + +end +endfunction diff --git a/macros/sinewave.bin b/macros/sinewave.bin new file mode 100644 index 0000000..e5535c2 Binary files /dev/null and b/macros/sinewave.bin differ diff --git a/macros/sinewave.sci b/macros/sinewave.sci new file mode 100644 index 0000000..d5bdfa9 --- /dev/null +++ b/macros/sinewave.sci @@ -0,0 +1,18 @@ +function y= sinewave(x, varargin) + +funcprot(0); +rhs= argn(2); +if(rhs<1 | rhs>3) +error("Wrong number of input arguments") +end + +select(rhs) + case 1 then + y= callOctave("sinewave", x); + case 2 then + y= callOctave("sinewave", x , varargin(1)); + case 3 then + y= callOctave("sinewave", x , varargin(1), varargin(2)); + +end +endfunction diff --git a/macros/spectral_adf.bin b/macros/spectral_adf.bin new file mode 100644 index 0000000..f0cdacf Binary files /dev/null and b/macros/spectral_adf.bin differ diff --git a/macros/spectral_adf.sci b/macros/spectral_adf.sci new file mode 100644 index 0000000..ea81f42 --- /dev/null +++ b/macros/spectral_adf.sci @@ -0,0 +1,18 @@ +function y= spectral_adf(x, varargin) + +funcprot(0); +rhs= argn(2); +if(rhs<1 | rhs>3) +error("Wrong number of input arguments") +end + +select(rhs) + case 1 then + y= callOctave("spectral_adf", x); + case 2 then + y= callOctave("spectral_adf", x , varargin(1)); + case 3 then + y= callOctave("spectral_adf", x , varargin(1), varargin(2)); + +end +endfunction diff --git a/macros/spectral_xdf.bin b/macros/spectral_xdf.bin new file mode 100644 index 0000000..78678da Binary files /dev/null and b/macros/spectral_xdf.bin differ diff --git a/macros/spectral_xdf.sci b/macros/spectral_xdf.sci new file mode 100644 index 0000000..fe93327 --- /dev/null +++ b/macros/spectral_xdf.sci @@ -0,0 +1,18 @@ +function y= spectral_xdf(x, varargin) + +funcprot(0); +rhs= argn(2); +if(rhs<1 | rhs>3) +error("Wrong number of input arguments") +end + +select(rhs) + case 1 then + y= callOctave("spectral_xdf", x); + case 2 then + y= callOctave("spectral_xdf", x , varargin(1)); + case 3 then + y= callOctave("spectral_xdf", x , varargin(1), varargin(2)); + +end +endfunction diff --git a/macros/spencer.bin b/macros/spencer.bin new file mode 100644 index 0000000..4808d26 Binary files /dev/null and b/macros/spencer.bin differ diff --git a/macros/spencer.sci b/macros/spencer.sci new file mode 100644 index 0000000..537ca8a --- /dev/null +++ b/macros/spencer.sci @@ -0,0 +1,15 @@ +function y= spencer(x) + +funcprot(0); + +rhs= argn(2); + +if(rhs <1 | rhs >1) +error("Wrong number of input arguments"); +end + +select(rhs) + case 1 then + y = callOctave("spencer",x); +end +endfunction diff --git a/macros/stft.bin b/macros/stft.bin new file mode 100644 index 0000000..6766353 Binary files /dev/null and b/macros/stft.bin differ diff --git a/macros/stft.sci b/macros/stft.sci new file mode 100644 index 0000000..01d8f9b --- /dev/null +++ b/macros/stft.sci @@ -0,0 +1,54 @@ +function [y,c]= stft(x, varargin) + +funcprot(0); +lhs= argn(1); +rhs= argn(2); + +if(rhs <1 | rhs>5) + error("Wrong number of input arguments"); +end + +if(lhs<1 | lhs>2) + error("Wrong number of output arguments"); +end + +select(rhs) + case 1 then + select(lhs) + case 1 then + y= callOctave("stft", x); + case 2 then + [y,c]= callOctave("stft", x); + end + case 2 then + select(lhs) + case 1 then + y= callOctave("stft", x,varargin(1)); + case 2 then + [y,c]= callOctave("stft", x, varargin(1)); + end + case 3 then + select(lhs) + case 1 then + y= callOctave("stft", x,varargin(1), varargin(2)); + case 2 then + [y,c]= callOctave("stft", x,varargin(1), varargin(2)); + end + case 4 then + select(lhs) + case 1 then + y= callOctave("stft", x,varargin(1), varargin(2), varargin(3)); + case 2 then + [y,c]= callOctave("stft", x,varargin(1), varargin(2), varargin(3)); + end + case 5 then + select(lhs) + case 1 then + y= callOctave("stft", x,varargin(1), varargin(2), varargin(3), varargin(4)); + case 2 then + [y,c]= callOctave("stft", x,varargin(1), varargin(2), varargin(3), varargin(4)); + end +end +endfunction + + diff --git a/macros/synthesis.bin b/macros/synthesis.bin new file mode 100644 index 0000000..e9730e4 Binary files /dev/null and b/macros/synthesis.bin differ diff --git a/macros/synthesis.sci b/macros/synthesis.sci new file mode 100644 index 0000000..e787c86 --- /dev/null +++ b/macros/synthesis.sci @@ -0,0 +1,16 @@ +function x= synthesis(Y,C) + +funcprot(0); +lhs= argn(1); +rhs= argn(2); + +if(rhs<2 | rhs >2) + error("Wrong number of input arguments"); +end + +select(rhs) + case 2 then + x= callOctave("synthesis", Y,C); + +end +endfunction diff --git a/macros/yulewalker.bin b/macros/yulewalker.bin new file mode 100644 index 0000000..388c88b Binary files /dev/null and b/macros/yulewalker.bin differ diff --git a/macros/yulewalker.sci b/macros/yulewalker.sci new file mode 100644 index 0000000..ebcb8aa --- /dev/null +++ b/macros/yulewalker.sci @@ -0,0 +1,24 @@ +function [A,V]= yulewalker(C) + +funcprot(0); +lhs=argn(1); +rhs= argn(2); + +if(rhs<1 | rhs>1) + error("Wrong number of input arguments"); +end + +if(lhs<1 | lhs>2) + error("Wrong number of output arguments"); +end + +select(lhs) + + case 1 then + A= callOctave("yulewalker", C); + case 2 then + [A,V]= callOctave("yulewalker", C); +end +endfunction + + -- cgit