MathGroup Archive 2008

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

Search the Archive

Re: Minimize with complex values

  • To: mathgroup at smc.vnet.net
  • Subject: [mg91487] Re: Minimize with complex values
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Sat, 23 Aug 2008 01:43:30 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <g8lpel$imm$1@smc.vnet.net>

shama shahbaz wrote:

> i want to minimize the absolute value of the following expression  how ca=
> n i do this in methamatica
>  
> [exp(pi/4) +exp(3*pi/4)*exp(jp)]+[exp(pi/4) *exp(-5*pi*/4)]+[exp(3*pi/4=
> )*exp(-3*pi*j/4)exp(jp)]+
>  
> [exp(pi/4) *exp(-10*pi*j/4)]+[exp(pi/4) *exp(-3*pi*j/2)exp(jp)]+[exp(pi=
> /4)*exp(-15*pi*j/4)]+
>  
> [exp(3*pi/4)*exp(-9*pi*j/4)exp(jp)]
>  
> p is the unknown value ,and it represent the phase...which is other than 0 =
> ......is there any way to calculate it.
> Regards=0A=0A=0A      

Say that "expr" holds your expression (written in correct Mathematica 
syntax), then you could use *NMinimize[]*. Note that you can also add 
constraint on the variable p.


     In[2]:= NMinimize[Abs[expr], p]

     Out[2]= {12.6907, {p -> -2.43096}}

     In[3]:= expr /. %[[2]]

     Out[3]= -12.512 + 2.12222 I

     In[4]:= NMinimize[{Abs[expr], 0 < p < 2 Pi}, p]

     Out[4]= {12.6907, {p -> 3.85222}}

     In[5]:= expr /. %[[2]]

     Out[5]= -12.512 + 2.12222 I


Regards,
-- Jean-Marc



  • Prev by Date: Mathematica and F#
  • Next by Date: Re: Minimize with complex values
  • Previous by thread: Re: Minimize with complex values
  • Next by thread: problems with condition in ReplaceAll