www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@sweepset/getUnitsAsChar.m

    function units = getUnitsAsChar(ss)
%GETUNITSASCHAR Return string representations of all the units
%
%  U = GETUNITSASCHAR returns a cell array where each cell contains the
%  string version of the units for that variable.

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


% Set up the output cell array of units
units = cell(numDataVariables(ss), 1);
for i = 1:numDataVariables(ss)
    units{i} = char(ss.var(i).units);
end