dpb
Posts:
6,689
Registered:
6/7/07
|
|
Re: Combining series of matrices
Posted:
Jan 22, 2013 12:38 PM
|
|
On 1/22/2013 9:35 AM, dpb wrote: > On 1/21/2013 4:12 PM, dpb wrote: ...
> ...Previous code elided for brevity to correct a syntax problem of > concatenating a structure w/ an array... ...
> Concatenate the L and R arrays then create the structure in the end-- > ...
OBTW, I did it that way 'cuz I presumed it would be faster w/o the structure in the way--you can, of course, also create a temporary structure in place of the temp arrays and concatenate them. If you're doing this a lot it's probably worth the effort to test each to check on relative performance...
Or, of course, there's the alternative that was suggested earlier I didn't implement of adding each to a cell array element and then converting to matrix at the end...I took your basic initial code and simply converted it to a temporary and removed the loops, etc., where unneeded as a pattern.
--
--
|
|