summaryrefslogtreecommitdiff
path: root/macros/diffpara.sci
blob: 3f9e2d977671897198ae64fbcbd8945d1976794d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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