summaryrefslogtreecommitdiff
path: root/macros/diffpara.sci
diff options
context:
space:
mode:
authorAbhinav Dronamraju2017-11-27 15:08:47 +0530
committerAbhinav Dronamraju2017-11-27 15:08:47 +0530
commit2bb28947f9736c1c65dd338bf1bc8fcc2570b22d (patch)
tree1119f866d3884fbeed16a617f99b4b0ec471be8c /macros/diffpara.sci
parent11f08cc395ea1b0de77af3dbb87a985418fc3800 (diff)
downloadFOSSEE-Signal-Processing-Toolbox-2bb28947f9736c1c65dd338bf1bc8fcc2570b22d.tar.gz
FOSSEE-Signal-Processing-Toolbox-2bb28947f9736c1c65dd338bf1bc8fcc2570b22d.tar.bz2
FOSSEE-Signal-Processing-Toolbox-2bb28947f9736c1c65dd338bf1bc8fcc2570b22d.zip
Added functions
Diffstat (limited to 'macros/diffpara.sci')
-rw-r--r--macros/diffpara.sci33
1 files changed, 33 insertions, 0 deletions
diff --git a/macros/diffpara.sci b/macros/diffpara.sci
new file mode 100644
index 0000000..3f9e2d9
--- /dev/null
+++ b/macros/diffpara.sci
@@ -0,0 +1,33 @@
+function [D,DD] = diffpara(X,varargin)
+ lhs= argn(1);
+ rhs= argn(2);
+ if(rhs <1 | rhs> 3)
+ error("Wrong number of input parameters");
+ end
+ if(lhs<1 | lhs>2)
+ error("Wrong number of output parameters");
+ end
+ select(rhs)
+ case 1 then
+ select(lhs)
+ case 1 then
+ D= diffpara(X);
+ case 2 then
+ [D, DD]= diffpara(X);
+ end
+ case 2 then
+ select(lhs)
+ case 1 then
+ D= diffpara(X, varargin(1));
+ case 2 then
+ [D, DD]= diffpara(X, varargin(1));
+ end
+ case 3 then
+ select(lhs)
+ case 1 then
+ D= diffpara(X, varargin(1), varargin(2));
+ case 2 then
+ [D, DD]= diffpara(X, varargin(1), varargin(2));
+ end
+ end
+endfunction