function out = igetfield(obj, field)
%IGETFIELD Get serial port object internal fields.
%
%    VAL = IGETFIELD(OBJ, FIELD) returns the value of object's, OBJ,
%    FIELD to VAL.
%
%    This function is a helper function for the concatenation and
%    manipulation of instrument object arrays. This function should
%    not be used directly by users.
%

%    MP 7-27-99
%    Copyright 1999-2000 The MathWorks, Inc. 
%    $Revision: 1.3 $  $Date: 2000/07/19 12:46:54 $


% Return the specified field information.
switch field
case 'jobject'
   out = obj.jobject;
case 'type'
    out = obj.type;
case 'constructor'
    out = obj.constructor;
case 'instrument'
    out = obj.instrument;
otherwise
   error(['Invalid field: ' field]);
end
