Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to avoid for loops in 3 vector function.
Date: Sun, 8 May 2011 22:14:05 +0000 (UTC)
Organization: California Institute of Technology
Lines: 9
Message-ID: <iq74jd$aju$1@newscl01ah.mathworks.com>
References: <ipmluu$l21$1@fred.mathworks.com> <ipph4t$8g9$1@fred.mathworks.com> <ippm7h$8au$1@fred.mathworks.com> <iprc6c$67r$1@fred.mathworks.com> <ipsjrq$ebg$1@fred.mathworks.com> <iptdis$4b3$1@fred.mathworks.com> <ipttoc$3aq$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-06-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1304892845 10878 172.30.248.38 (8 May 2011 22:14:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 8 May 2011 22:14:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2843808
Xref: news.mathworks.com comp.soft-sys.matlab:725768

"Roger Stafford" wrote in message <ipttoc$3aq$1@fred.mathworks.com>...
> "Roger Stafford" wrote in message <iptdis$4b3$1@fred.mathworks.com>...
> >   Another thought about your code has occurred to me rather belatedly.  Let it be called point #6.  The only thing that changes in the 2000 passes through that second for loop is the value v obtained from V0(i). ........
> - - - - - - -
>   Please forget about point #6.  I was temporarily forgetting about the constraint imposed by vec2 (even though that was the subject of my point #2 which I believe is still valid.)  That makes every b curve different as i varies, not just a shift of a single curve.
> 
> Roger Stafford

Thank you so much for all advice. It greatly improved the code's efficiency. I have only one question. Does MATLAB has any free global optimization routines? I'm interested since, my b in other models I will simulate, b will be a vector, so it will involve multi-dimensional optimization...