Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Dummy varable' topicStudent Support Forum > General > "Dummy varable"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
11/08/12 2:30pm

To restrict the domain to 0,1 see what happens if you add a constraint x*(x-1)==0 for all your variables x.

That appears to work for the small example I tried.

In[1]:= NMinimize[{a*3+(b-2)*2,a*(a-1)==0&&b*(b-1)==0&&a+b==1},{a,b}]

Out[1]= {-2.0000, {a->-1.8626*^-9, b->1.0000}}

URL: ,

Subject (listing for 'Dummy varable')
Author Date Posted
Dummy varable Zero 11/08/12 07:09am
Re: Dummy varable Bill Simpson 11/08/12 2:30pm
Re: Dummy varable Peter Pein 11/10/12 08:57am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic