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/sinewave.sci | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 macros/sinewave.sci (limited to 'macros/sinewave.sci') 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 -- cgit