comparison scripts/miscellaneous/substruct.m @ 10549:95c3e38098bf

Untabify .m scripts
author Rik <code@nomad.inbox5.com>
date Fri, 23 Apr 2010 11:28:50 -0700
parents b122dd3075ce
children fbd7843974fa
comparison
equal deleted inserted replaced
10548:479536c5bb10 10549:95c3e38098bf
57 dots = strcmp (typ, "."); 57 dots = strcmp (typ, ".");
58 if (all (braces | dots)) 58 if (all (braces | dots))
59 cells = cellfun ("isclass", sub, "cell"); 59 cells = cellfun ("isclass", sub, "cell");
60 chars = cellfun ("isclass", sub, "char"); 60 chars = cellfun ("isclass", sub, "char");
61 if (any (braces &! cells)) 61 if (any (braces &! cells))
62 error ("substruct: for type == () or {}, subs must be a cell array"); 62 error ("substruct: for type == () or {}, subs must be a cell array");
63 elseif (any (dots &! chars)) 63 elseif (any (dots &! chars))
64 error ("substruct: for type == ., subs must be a character string"); 64 error ("substruct: for type == ., subs must be a character string");
65 endif 65 endif
66 else 66 else
67 error ("substruct: expecting type to be one of \"()\", \"{}\", or \".\""); 67 error ("substruct: expecting type to be one of \"()\", \"{}\", or \".\"");