Code covered by the BSD License  

Highlights from
showcells

image thumbnail

showcells

by

 

25 Jan 2013 (Updated )

Display contents and structure of a cell array using ASCII boxes.

demo.m
% example usage for Showcells
x = input('\nPress any key for a 1-dimensional example.\n','s');
disp('Default:');
c = {'a','b','c'}
disp('Showcells:');
showcells(c);

x = input('\nPress any key for a nested 2-dimensional example.\n','s');
disp('Default:');
c = {1:3,magic(3),exp(-(1:10).'); ...
  -10:-2,{NaN,'Hello, world!';Inf,rand(3)},'MATLAB'.'}
disp('Showcells:');
showcells(c);

x = input('\nPress any key for an N-dimensional example.\n','s');
n = 4;
c = arrayfun(@(x) 1:x, 1:(2^n),'UniformOutput',false);
disp('Default:');
c = reshape(c,2*ones(1,n))
disp('Showcells:');
showcells(c);

Contact us