cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

Minimizing for a family of functions

AlvaroDíaz
9-Granite

Minimizing for a family of functions

Hi. How to minimize a family of functions over the same range with the same given-minimize block?

Regards. Alvaro.
39 REPLIES 39

>How to implement this ? <<br> _________________________

Implement what ?
I gave you the working "Golden ratio"
Just plug your stuff in there.

jmG
RichardJ
19-Tanzanite
(To:TomGutman)

On 10/25/2009 1:03:52 AM, Tom_Gutman wrote:
>Here's the version that works
>in MC11 and MC14. Also how to
>use arrays to automatically
>iterate over the target
>functions.

The use of arrays doesn't work in MC14. Not that important; I'm just making an observation.

Richard

Another bug in SUC (SUC SUX). It is not properly recognizing that the vectorize operator removes a level of array nesting. And it is complaining about the use of arrays where scalars are called for. Doing the same thing using explicit range variable iteration works.
__________________
� � � � Tom Gutman
RichardJ
19-Tanzanite
(To:TomGutman)

On 10/24/2009 4:39:39 PM, Tom_Gutman wrote:
> Perhaps it has
>to do with minimize not being
>an actual function (note the
>inability to get a signature
>for it) but a special form.
>As such, it presumably needs
>special code in SUC, code that
>was not provided.

Yes, interesting observation.

That's probably also the reason solve blocks always give the same useless error message about undefined variables, regardless of what the problem actually is.

Richard

On 10/24/2009 10:19:58 AM, rijackson wrote:
>On 10/24/2009 6:36:30 AM, adiaz wrote:
>>Amazing technique.
>
>Yes, but unfortunately one that does not work post version 11. SUC strikes again (it requires that f be a function, whereas in fmin(f,x):Minimize(f,x) it could be anything).

Thanks for the adverting.

Regards. Alvaro.

On 10/24/2009 10:58:31 PM, adiaz wrote:
>On 10/24/2009 10:19:58 AM, rijackson
>wrote:
>>On 10/24/2009 6:36:30 AM, adiaz wrote:
...
___________________________

My work sheet MCD11], does it work for you ?
If it does, it will as well in lower versions.

jmG


On 10/24/2009 11:36:21 PM, jmG wrote:
>On 10/24/2009 10:58:31 PM, adiaz wrote:
>>On 10/24/2009 10:19:58 AM, rijackson
>>wrote:
>>>On 10/24/2009 6:36:30 AM, adiaz wrote:
>...
>___________________________
>
>My work sheet MCD11], does it work for
>you ?
>If it does, it will as well in lower
>versions.
>
>jmG
>_________________________

Code it for the applicable version.

jmG



On 10/24/2009 11:36:21 PM, jmG wrote:
>My work sheet MCD11], does it work for you ?
>If it does, it will as well in lower versions.

Works fine, thanks.

Regards. Alvaro.

On 10/24/2009 2:30:06 AM, adiaz wrote:
>Hi. How to minimize a family
>of functions over the same
>range with the same
>given-minimize block?
>
>Regards. Alvaro.
______________________________

By introducing a dummy guess argument in the functions and assigning the solver carrying a dummy objective argument.

Saved Mathcad 2000, unknown if working in 14.

jmG

Another criterion: brute force scan, interpolate, find critical points, select the interval and finally call minimize or user defined algorithm, as parameter to the fmin function.

With derivatives, but reduces the target function calls.

Alvaro.
Top Tags