Home > marsbar > @marsy > summary_size.m

summary_size

PURPOSE ^

method returns number of time points x number of regions

SYNOPSIS ^

function [m,n] = summary_size(o, dim)

DESCRIPTION ^

 method returns number of time points x number of regions

 $Id$

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [m,n] = summary_size(o, dim)
0002 % method returns number of time points x number of regions
0003 %
0004 % $Id$
0005   
0006 st = o.y_struct;
0007 sz = [0 0];
0008 if isfield(st, 'Y')
0009   sz = size(st.Y);
0010 elseif isfield(st, 'regions')
0011   if iscell(st.regions)
0012     if isfield(st.regions{1}, 'Y')
0013       sz(1) = size(st.regions{1}.Y, 1);
0014     end
0015   end
0016   sz(2) = length(st.regions);
0017 end
0018 
0019 if nargin < 2
0020   if nargout > 1
0021     m = sz(1); n = sz(2);
0022   else
0023     m = sz;
0024   end
0025 else  
0026   if dim > 2
0027     m = (m+n > 0)
0028   else
0029     m = sz(dim);
0030   end
0031 end

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