TESTAO checks that an analysis object has the correct class fields. M Hewitson 01-02-07 $Id: testAO.m,v 1.2 2007/05/08 10:09:45 hewitson Exp $
0001 function testAO(ao) 0002 0003 % TESTAO checks that an analysis object has the correct class fields. 0004 % 0005 % M Hewitson 01-02-07 0006 % 0007 % $Id: testAO.m,v 1.2 2007/05/08 10:09:45 hewitson Exp $ 0008 % 0009 0010 % check the data field 0011 if ~isa(ao.data, 'tsdata') &&... 0012 ~isa(ao.data, 'fsdata') &&... 0013 ~isa(ao.data, 'cdata') &&... 0014 ~isa(ao.data, 'xydata') &&... 0015 error('### unknown data object.') 0016 end 0017 % check the history field 0018 if ~isa(ao.hist, 'history') 0019 error('### unknown history object.') 0020 end 0021 0022 % END