Home > marsbar > @marsy > summary.m

summary

PURPOSE ^

method returns cell array of strings describing marsy object

SYNOPSIS ^

function strs = summary(M)

DESCRIPTION ^

 method returns cell array of strings describing marsy object
 
 $Id$

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function strs = summary(M)
0002 % method returns cell array of strings describing marsy object
0003 %
0004 % $Id$
0005   
0006 strs{1} = sprintf('Description:           \t%s',  summary_descrip(M));
0007 strs{2} = sprintf('Number of time points: \t%d',  n_time_points(M));
0008 strs{3} = sprintf('Number of regions:     \t%d',  n_regions(M));
0009 s_f = is_summarized(M);
0010 strs{4} = sprintf('Is summarized?:        \t%s',  sf_recode(s_f));
0011 strs{5} = sprintf('Summary function:      \t%s',  sumfunc(M));
0012 if ~s_f
0013   strs{end+1} = sprintf('Can be summarized?:    \t%s', ...
0014             sf_recode(can_summarize(M)));
0015 end
0016 ns = region_name(M, [], [], '');
0017 if isempty(strvcat(ns))
0018   strs{end+1} = sprintf('Region names:          \t%s', ...
0019       'not specified');
0020 else
0021   strs{end+1} = 'Region names:';
0022   for i = 1:length(ns)
0023     strs{end+1} = sprintf('Region %d:  %s', i, ns{i});
0024   end
0025 end
0026 return
0027 
0028 function str = sf_recode(tf)
0029 if isnan(tf), str = 'unknown';
0030 elseif tf,    str = 'yes';
0031 else          str = 'no';
0032 end

Generated on Wed 11-May-2022 16:26:09 by m2html © 2003-2019