function update(cd,r)
%UPDATE  Data update method for @eventCharData class.

%  Author(s):  
%  Copyright 1986-2002 The MathWorks, Inc.
%  $Revision: 1.1.6.1 $  $Date: 2004/12/26 21:38:32 $

data = r.DataSrc.Timeseries.Data;
cd.MeanValue = NaN*zeros([size(data,2) 1]);
for k=1:size(data,2)
   J = find(~isnan(data(:,k)));
   if ~isempty(J)
       cd.MeanValue(k) = median(data(J,k));
   else
       cd.MeanValue(k) = NaN;
   end
end