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