diff options
Diffstat (limited to 'macros/sinetone.sci')
-rw-r--r-- | macros/sinetone.sci | 20 |
1 files changed, 20 insertions, 0 deletions
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 |