From: William P. Y. H <wil...@ya...> - 2005-11-19 03:31:17
|
--- Paul Kienzle <pki...@us...> wrote: > I'm not sure that use of cell2mat and cellfun improves either speed or > readability. > While speed may suffer a bit, I think it's more readable (no need to loop by ourselves). > Regardless, the following test looks incorrect: > > + if (! all (cellfun ("ndims", varargin))) > + error ("All of the arguments to blkdiag must be two dimensional > matrices"); > + endif > Sorry, my fault. I didn't check for n-dimensional arrays (which should return an error). Btw, thanks, (I think) I found a few bugs in cellfun. The new diff to blkdiag.m is attached. William Poetra Yoga Hadisoeseno __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com |