Mercurial > hg > ishara
annotate general/arrutils/sizes.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
parents | e44f49929e56 |
children |
rev | line source |
---|---|
samer@4 | 1 function S=sizes(A) |
samer@4 | 2 % sizes - return sizes of elements in cell array |
samer@4 | 3 % |
samer@4 | 4 % sizes :: {I:[N]->[Size(I):[[1,E]]] -> [[N,E]]. |
samer@4 | 5 % |
samer@4 | 6 % The sizes of the N E-dimensional arrays in the input are collected |
samer@4 | 7 % into an N-by-E array. All arrays must have the same number of dimensions |
samer@4 | 8 % as returned by size. |
samer@4 | 9 |
samer@4 | 10 S=zeros([length(A) 2]); |
samer@4 | 11 for k=1:length(A) |
samer@4 | 12 S(k,:)=size(A{k}); |
samer@4 | 13 end |