www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@sweepset/exporttable.m
function t = exporttable(ss,IncludeLOGNO) %exporttable export sweepset to table % t = exporttable(ss) % Copyright 2015-2015 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin<2 IncludeLOGNO = true; end % only include log number for data with more than 1 stage IncludeLOGNO = IncludeLOGNO && numstages(ss)>1; s = sweepset2struct(ss,IncludeLOGNO); % create table t = array2table(s.data,'VariableNames',s.varNames); if ~isempty(s.varUnits) % export units if defined t.Properties.VariableUnits = s.varUnits; end if ~isempty(s.varDescriptions) % export descriptions if defined t.Properties.VariableDescriptions = s.varDescriptions; end % set Description to filename if isstring(ss.filename) t.Properties.Description = ss.filename; elseif iscell(ss.filename) t.Properties.Description = sprintf('%s;',ss.filename{:}); end