summaryrefslogtreecommitdiff
path: root/macros/fractdiff.sci
diff options
context:
space:
mode:
Diffstat (limited to 'macros/fractdiff.sci')
-rw-r--r--macros/fractdiff.sci17
1 files changed, 17 insertions, 0 deletions
diff --git a/macros/fractdiff.sci b/macros/fractdiff.sci
new file mode 100644
index 0000000..979a079
--- /dev/null
+++ b/macros/fractdiff.sci
@@ -0,0 +1,17 @@
+function y= fractdiff(x,d)
+//Compute the fractional differences (1-L)^d x where L denotes the lag-operator and d is greater than -1.
+//Calling Sequence
+// fractdiff (X, D)
+//Description
+//This is an Octave function.
+//Compute the fractional differences (1-L)^d x where L denotes the lag-operator and d is greater than -1.
+ funcprot(0);
+ rhs= argn(2);
+ if(rhs < 2 | rhs >2)
+ error("Wrong number of input arguments");
+ end
+ select(rhs)
+ case 2 then
+ y= callOctave("fractdiff",x,d);
+ end
+endfunction \ No newline at end of file