comparison m-toolbox/classes/+utils/@helper/isobject.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 function varargout = isobject(varargin)
2 % ISOBJECT checks that the input objects are one of the LTPDA object types.
3 %
4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5 %
6 % DESCRIPTION: ISOBJECT checks that the input objects are one of the LTPDA object
7 % types.
8 %
9 % CALL: result = ltpda_isobject(a1)
10 % classes = ltpda_isobject()
11 %
12 % INPUTS: objects
13 %
14 % OUTPUTS: result == 1 if all input objects are LTPDA objects
15 % result == 0 otherwise
16 % classes - a list of recognised LTPDA object types
17 %
18 % VERSION: $Id: isobject.m,v 1.1 2008/06/18 13:35:12 hewitson Exp $
19 %
20 % HISTORY: 09-05-07 M Hewitson
21 % Creation
22 %
23 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
24
25 for j=1:nargin
26 if ~isa(varargin{j}, 'ltpda_obj')
27 varargout{1} = 0;
28 return;
29 end
30 end
31
32 % Then we were succesful
33 varargout{1} = 1;
34
35 % END