[Date Index]
[Thread Index]
[Author Index]
RE: Minimize - What am I doing worng?
*To*: mathgroup at smc.vnet.net
*Subject*: [mg113409] RE: Minimize - What am I doing worng?
*From*: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
*Date*: Wed, 27 Oct 2010 05:17:22 -0400 (EDT)
*References*: <ia67g9$sut$1@smc.vnet.net> <782bf599-245b-40cd-979c-b377b240b08e@u17g2000yqi.googlegroups.com> <003601cb754f$5d5f1650$181d42f0$@com> <4cc73fea.cc7e0e0a.4a87.ffffe1cb@mx.google.com> <006d01cb7556$1d66ba60$58342f20$@com> <4cc74d66.ce7c0e0a.3ace.ffffe718@mx.google.com> <008001cb7569$ed4ddcf0$c7e996d0$@com>
Actually, the correct format would be to remove only the inner {} around mu.
Minimize[{\[Mu], {\[Mu] >=
Abs[-0.485532 Subscript[\[Lambda], 1] -
0.485801 Subscript[\[Lambda], 2] + 0.4858] && \[Mu] >=
Abs[-0.514468 Subscript[\[Lambda], 1] -
0.514199 Subscript[\[Lambda], 2] + 0.5142] &&
Subscript[\[Lambda], 1] + Subscript[\[Lambda], 2] == 1 &&
Subscript[\[Lambda], 1] >= 0 &&
Subscript[\[Lambda], 2] >= 0 && \[Mu] >= 0}}, {\[Mu],
Subscript[\[Lambda], 1], Subscript[\[Lambda], 2]}]
Where in your input did you say to use the Reals domain? Can't see it here.
I'm not sure what you mean by your last question. I don't think Minimize can be used to minimize the value of two variables.
Interestingly, if I change the subscripts to become part of the variable name (lambda1 etc), the results differ slightly. For me lambda2 -> 0.996283 instead of 1.
Cheers -- Sjoerd
-----Original Message-----
From: Eduardo M. A. M.Mendes [mailto:emammendes at gmail.com]
Sent: Wednesday 27 October 2010 02:00
To: 'Sjoerd C. de Vries'
Subject: [mg113409] RE: Minimize - What am I doing worng?
Hi
I copied the double brackets from the examples or at least this is what I got form the examples. For _, I did use crtl-underscore for subscripts; I guess notepad has wrecked the formatting.
The funny thing is that if I replace all "reals" for rationals, Mathematica does not complain at all. Go figure...
Many many thanks
Ed
PS. Don't I have add brackets if I want to minimize say \Mu_1 and \Mu_2? Something like {\Mu_1,\Mu_2}?
-----Original Message-----
From: Sjoerd C. de Vries [mailto:sjoerd.c.devries at gmail.com]
Sent: Tuesday, October 26, 2010 7:51 PM
To: 'Eduardo M. A. M.Mendes'
Cc: steve at smc.vnet.net
Subject: [mg113409] RE: Minimize - What am I doing worng?
Ed,
Mu should not be in double curly brackets (not even in single ones). You shouldn't use _1 and _2 as you did. _ is a special character in Mathematica (signifies a pattern). Use ctrl-underscore for subscripts.
The following is a sanitized version of your input which works for me
Minimize[\[Mu], {\[Mu] =
>
Abs[-0.485532 Subscript[\[Lambda], 1] -
0.485801 Subscript[\[Lambda], 2] + 0.4858] && \[Mu] >=
Abs[-0.514468 Subscript[\[Lambda], 1] -
0.514199 Subscript[\[Lambda], 2] + 0.5142] &&
Subscript[\[Lambda], 1] + Subscript[\[Lambda], 2] == 1 &&
Subscript[\[Lambda], 1] >= 0 &&
Subscript[\[Lambda], 2] >= 0 && \[Mu] >= 0}, {\[Mu],
Subscript[\[Lambda], 1], Subscript[\[Lambda], 2]}]
Cheers -- Sjoerd
-----Original Message-----
From: Eduardo M. A. M.Mendes [mailto:emammendes at gmail.com]
Sent: Tuesday 26 October 2010 23:38
To: 'Sjoerd C. de Vries'
Subject: [mg113409] RE: Minimize - What am I doing worng?
Here is the command please let me know if you can see it
Minimize[{{=CE=BC},{=CE=BC=E2=89=A5Abs[-0.485532=CE=BB_1-0.485801=CE=BB_2=
+0.4858]&&=CE=BC=E2=89=A5Abs[-0.514468=CE=BB_1-0.514199=CE=BB_2+0.5142]&&=
=CE=BB_1+=CE=BB_2==1&&=CE=BB_1=E2=89=A50&&=CE=BB_2=E2=89=A50&&=CE=BC=E2=
=89=A50}},{=CE=BC,=CE=BB_1,=CE=BB_2}]
Ed
-----Original Message-----
From: Sjoerd C. de Vries [mailto:sjoerd.c.devries at gmail.com]
Sent: Tuesday, October 26, 2010 6:54 PM
To: 'Eduardo M. A. M.Mendes'
Subject: [mg113409] RE: Minimize - What am I doing worng?
Copy as text from the Edit menu usually works. Sometimes pasting the
clipboard to an ascii editor such as Notepad and copying back gets rid =
of
ascii problems so that the clipboard is clean for a copy to your =
newsreader.
Cheers -- Sjoerd
-----Original Message-----
From: Eduardo M. A. M.Mendes [mailto:emammendes at gmail.com]
Sent: Tuesday 26 October 2010 22:50
To: 'Sjoerd C. de Vries'
Subject: [mg113409] RE: Minimize - What am I doing worng?
HI ya
I did copy but I think it is somehow formatted. How can I copy a =
formatted
input in Mathematica and paste it as text?
Many thanks
Ed
-----Original Message-----
From: Sjoerd C. de Vries [mailto:sjoerd.c.devries at gmail.com]
Sent: Tuesday, October 26, 2010 4:51 PM
To: Eduardo M. A. M.Mendes
Subject: [mg113409] Re: Minimize - What am I doing worng?
Hi Ed,
It's difficult to detremine what precisely goes wrong since you forgot
to include your input, but judging from the output it might be that
you are using a function that returns a list rather than a number.
Cheers -- Sjoerd
On Oct 26, 11:37 am, "Eduardo M. A. M.Mendes" <emammen... at gmail.com>
wrote:
> Hello
>
> I am trying to use minimize as follows
>
> But unfortunately Mathematica returns
>
> NMinimize::nnum: The function value \[NoBreak]{1.30494}\[NoBreak] is =
not a
> number at \[NoBreak]{m,l1,l2}\[NoBreak] =
> \[NoBreak]{1.30494,0.36693,0.63307}\[NoBreak].
> <http://reference.wolfram.com/mathematica/ref/NMinimize.html> =87
>
> What am I doing wrong? If I use rational numbers there is no problem.
>
> Many thanks
>
> Ed
Prev by Date:
**Re: discrete points in 3D polar**
Next by Date:
**Re: More Mathematica CAN'T do than CAN???**
Previous by thread:
**Re: Minimize - What am I doing worng?**
Next by thread:
**EventHandler vs ControllerState**
| |