summaryrefslogtreecommitdiff
path: root/macros/detrend1.sci
diff options
context:
space:
mode:
Diffstat (limited to 'macros/detrend1.sci')
-rw-r--r--macros/detrend1.sci12
1 files changed, 12 insertions, 0 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