Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Optimization Multiple conditions' topicStudent Support Forum > General > Archives > "Optimization Multiple conditions"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
toen
03/30/12 10:14am

Hi Shaun,

the problem is with your function "g". As mathematica trials different values of f1, f2, seeking to minimize g[10,f1,f2,1500] it finds a set of values for f1 and f2 that gives a complex result.

This can be fixed by changing g to avoid it taking complex values. *Perhaps* it might be appropriate to introduce a Re[] function in part of your definition of g to get rid of imaginary values far from the minimum. Use caution if you do this.

cheers,
toen

URL: ,

Subject (listing for 'Optimization Multiple conditions')
Author Date Posted
Optimization Multiple conditions Shaun Hooper 03/28/12 8:41pm
Re: Optimization Multiple conditions toen 03/30/12 10:14am
Re: Re: Optimization Multiple conditions Shaun Hooper 04/01/12 10:02pm
Re: Optimization Multiple conditions toen 04/02/12 1:27pm
Re: Optimization Multiple conditions Bill Simpson 04/03/12 02:44am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic