saveobj function - does run length encoding if helpful $Id$
0001 function o = saveobj(o) 0002 % saveobj function - does run length encoding if helpful 0003 % 0004 % $Id$ 0005 0006 m = o.dat; 0007 if isnumeric(m) 0008 rlem = my_rle(m); 0009 if prod(size(rlem)) < prod(size(m)) 0010 o.dat = struct('rlem', rlem, 'dim', size(m)); 0011 end 0012 end