Mercurial > hg > ltpda
comparison m-toolbox/classes/@ltpda_uoh/testCallerIsMethod.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 % TESTCALLERISMETHOD hidden static method which tests the 'internal' command of a LTPDA-function. | |
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3 % | |
4 % DESCRIPTION: TESTCALLERISMETHOD hidden static method which tests the 'internal' | |
5 % command of a LTPDA-function. This means for example that the | |
6 % method doesn't add history to the object. | |
7 % | |
8 % CALL: 'normal' command | |
9 % out = ltpda_uoh.testCallerIsMethod(@fcn, arg1, arg2, ...); | |
10 % | |
11 % modifier command | |
12 % ltpda_uoh.testCallerIsMethod(@fcn, arg1, arg2, ...); | |
13 % | |
14 % INPUTS: fcn: Function name you want to test | |
15 % args: Input arguments for the function | |
16 % | |
17 % VERSION: $Id: testCallerIsMethod.m,v 1.2 2011/04/19 10:40:16 ingo Exp $ | |
18 % | |
19 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
20 | |
21 function out = testCallerIsMethod(varargin) | |
22 | |
23 fcn = varargin{1}; | |
24 args = varargin(2:end); | |
25 | |
26 if nargout >= 1 | |
27 out = fcn(args{:}); | |
28 else | |
29 fcn(args{:}); | |
30 out = varargin{1}; | |
31 end | |
32 | |
33 end |