MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Problem with NMinimize

  • To: mathgroup at
  • Subject: [mg91571] Re: [mg91549] Problem with NMinimize
  • From: Lai Ngoc Anh <anhngoclai at>
  • Date: Thu, 28 Aug 2008 03:15:16 -0400 (EDT)

hi, One time I used NMinimize to find optimum parameters of one function.
 it didnt give the correct best fitted parameters. When I use NonlinlearRegress, it gave the correct answer. I do not know whether it can help you or not. Please try and see what happen. Lai Ngoc Anh

----- Original Message ---- 

From: shama shahbaz <shammashahbaz at> 
To: mathgroup at 
Sent: Wednesday, August 27, 2008 12:41:09 PM 
Subject: [mg91571] [mg91549] Problem with NMinimize  i want to minimize the absolute value of this Equation

 e1=((0.0676+0.0067*I)*EXP[p1*I] )+(0.1633-0.0495*I)+(0.0676-0.0555*I)+((0.1633-0.3056*I)*EXP[p2*I]); e2=((0.1060-0.0708*I)*EXP[p1*I])+( 0.0708-0.1060*I)+( 0.0293-0.1474*I)+((-0.0439-0.2207*I)*EXP[p2*I]); e3=((0.0495-0.1633*I)*EXP[p1*I])+( -0.0067-0.0676*I)+( -0.0873-0.1633*I)+(( -0.0824-0.0676*I)*EXP[p2*I]); e4=((-0.0732-0.1768*I)*EXP[p1*I])+( 0*I)+( -0.1768-0.0732*I)+(( 0*I)*EXP[p2*I]); e5=((-0.1633-0.0873*I)*EXP[p1*I])+( 0.0676+0.0067*I)+( -0.1633+0.0495*I)+(( 0.0676-0.0555*I)*EXP[p2*I]);  c1bs[e1]; c2=Abs[e2]; c3=Abs[e3]; c4=Abs[e4]; c5bs[e5];   Minimize[{(c1)2+(c2)2+(c3)2+(c4)^2 +(c5)^2,0=A3p132*Pi,0=A3p2=A32*Pi},{p1,p2}]   but it did not give me any answer  but i know that NMinimize can minimize the squared absolute value of the complex number as i have tried as following  q=(1.41*(Exp[Pi/4*I]+Exp[p*I]+1+Exp[p*I]*Exp[Pi*I/4]))^2; q1=(1.41*(Exp[Pi/5*I]+Exp[p1*I]+1+Exp[p1*I]*Exp[Pi/7*I]))^2; expressionbs[q]+Abs[q1]; NMinimize[{expression,0<p<2 Pi,0<p1<2 Pi},{p,p1}]  it g!
es me answer  {0.00453162,{pE3.14159,p1=AE3.23135}}  i dont know where i am wrong .....can some one point that out   Regards         

  • Prev by Date: Re: Problem with NMinimize
  • Next by Date: Re: Manipulate evaluates repeatedly - how do i stop it
  • Previous by thread: Re: Problem with NMinimize
  • Next by thread: Plotting against Normal