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$>
References: <ipmluu$l21$> <ipph4t$8g9$> <ippm7h$8au$> <iprc6c$67r$> <ipsjrq$ebg$> <iptdis$4b3$> <ipttoc$3aq$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1304892845 10878 (8 May 2011 22:14:05 GMT)
NNTP-Posting-Date: Sun, 8 May 2011 22:14:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2843808
Xref: comp.soft-sys.matlab:725768

"Roger Stafford" wrote in message <ipttoc$3aq$>...
> "Roger Stafford" wrote in message <iptdis$4b3$>...
> >   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...