diff m-toolbox/classes/@history/getObjectClass.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m-toolbox/classes/@history/getObjectClass.m	Wed Nov 23 19:22:13 2011 +0100
@@ -0,0 +1,28 @@
+% GETOBJECTCLASS get the class of object that this history refers to.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% DESCRIPTION: GETOBJECTCLASS get the class of object that this history
+%              refers to.
+%
+% CALL:        cl = getObjectClass(h);
+%
+% INPUT:       h - history object
+%
+% OUTPUT:      cl  - the class that this history refers to
+%
+% VERSION:     $Id: getObjectClass.m,v 1.6 2010/08/18 15:15:54 ingo Exp $
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function varargout = getObjectClass(varargin)
+  
+  % Check the inputs
+  if nargin ~= 1
+    error('### This method accepts only one history object.');
+  end
+  
+  h  = varargin{1};
+  
+  varargout{1} = h.objectClass;
+end
+