Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Minor disappointment with Matlab
Date: Tue, 8 Sep 2009 18:25:05 +0000 (UTC)
Organization: Boeing
Lines: 7
Message-ID: <h867i1$oo0$1@fred.mathworks.com>
References: <25f0b0e8-fa6b-4283-81eb-d3bfebeb4a97@c37g2000yqi.googlegroups.com> <37a033b3-1375-4593-b673-460ea2713401@x37g2000yqj.googlegroups.com> <h85rum$p3t$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1252434305 25344 172.30.248.37 (8 Sep 2009 18:25:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 8 Sep 2009 18:25:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 756104
Xref: news.mathworks.com comp.soft-sys.matlab:569043


"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <h85rum$p3t$1@fred.mathworks.com>...
> 
> The factor 30 comes only when you use CROSS inside the for loop, which is a bad way of using it.

That statement is a bit too black-and-white for me. There can be several cases, such as simulations, where a cross product is needed in the formation of derivatives etc. that affect the very next iteration. It is impossible to vectorize the cross product calculations in this case over the entire simulation. That is precisely the case where a factor of 30 would not be tolerable and hand coding the calculations makes sense.

James Tursa