0001 function md=addnote(md,string)
0002
0003
0004
0005
0006
0007
0008
0009
0010 if (nargin~=2) | (nargout~=1),
0011 addnoteusage;
0012 error(' ');
0013 end
0014
0015 if ~ischar(string),
0016 error('addnote error message: second input argument should be a string');
0017 end
0018 notes=md.notes;
0019
0020 if ischar(notes),
0021 newnotes=cell(2,1);
0022 newnotes(1)={notes};
0023 newnotes(2)={string};
0024 else
0025 newnotes=cell(length(notes)+1,1);
0026 for i=1:length(notes),
0027 newnotes(i)=notes(i);
0028 end
0029 newnotes(length(notes)+1)={string};
0030 end
0031
0032 md.notes=newnotes;
0033
0034 function addnoteusage()
0035 disp('addnote usage:');
0036 disp(' model=addnote(model,string)');