help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple 'for' loop question


From: Jordi Gutierrez Hermoso
Subject: Re: Simple 'for' loop question
Date: Tue, 5 Jun 2007 17:59:19 -0500

On 05/06/07, Jordi Gutierrez Hermoso <address@hidden> wrote:
Incidentally, this is how you can avoid for loops altogether in this example:

     CO = [X'(:),Y'(:),Z'(:)] - repmat(O,sum(size(X)),1);

Sorry, bug. I should have tested that before I sent it. It should be

     CO = repmat(O,prod(size(X)),1) - [X'(:),Y'(:),Z'(:)];

- Jordi G. H.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]