view general/arrutils/sizes.m @ 4:e44f49929e56

Adding reorganised general toolbox, now in several subdirectories.
author samer
date Sat, 12 Jan 2013 19:21:22 +0000
parents
children
line wrap: on
line source
function S=sizes(A)
% sizes - return sizes of elements in cell array
%
% sizes :: {I:[N]->[Size(I):[[1,E]]] -> [[N,E]].
%
% The sizes of the N E-dimensional arrays in the input are collected 
% into an N-by-E array. All arrays must have the same number of dimensions
% as returned by size.

S=zeros([length(A) 2]);
for k=1:length(A)
	S(k,:)=size(A{k});
end