www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@xregtools/@MBrowser/SetViewData.m

    function SetViewData(h,data,ID)
% SETVIEWDATA  Set data into MBrowser store
%
%  h.SetViewData(DATA, GUID/INDEX)
%

%  Copyright 2000-2011 The MathWorks, Inc. and Ford Global Technologies, Inc.




if h.GUIExists
   if nargin<3
      ind=h.ViewCurrent;
   else
      % is a GUID/index?
      if isnumeric(ID)
         ind=ID;
      elseif ischar(ID)
         % search in list of GUIDs
         ind=find( strcmp( ID,h.ViewGUIDs ) );
      else
          warning(message('mbc:xregtools:MBrowser:InvalidArgument2'));
         return
      end
   end
   h.ViewData(ind).info=data;
end