www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgsurfview/@svdata/setValues.m

    function setValues(obj,ind,vals,name)
%SETVALUES Assigns a data set
%
% obj.setValues(index,values,name)
%

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


if ~isnumeric(vals)
    error(message('mbc:cgsurfview:svdata:InvalidArgument'));
elseif ~ischar(name)
    error(message('mbc:cgsurfview:svdata:InvalidArgument1'));
elseif ~isempty(obj.values{ind})
    error(message('mbc:cgsurfview:svdata:InvalidState', ind));
end
obj.values{ind} = vals;
obj.datasetnames{ind} = name;