MathGroup Archive 1999

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

Search the Archive

Re: typing starting values in FindMinimum

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15409] Re: typing starting values in FindMinimum
  • From: "Atul Sharma" <mdsa at musica.mcgill.ca>
  • Date: Wed, 13 Jan 1999 20:57:23 -0500
  • Organization: McGill University Computing Centre
  • References: <77f0j5$m17@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

If you have to repeatedly insert the same number of arguements (i.e. 3
in this example), you can set up your list of start values as you've
done and then use the following command:

In[19]:=
FindMinimum[Apply[Plus,e^2],startval[[1]],startval[[2]],startval[[3]],
  Method->Newton,
Gradient->j]
Out[19]=
({8.68919680`*^-23, {l1 ->0.79999999`,
      l2 ->0.70000000`, l3 ->0.600`}})

The [problem you were having was that the Find Minimum command doesn't
want the outer set of braces in your list.

A. Sharma


Albert Maydeu-Olivares wrote in message <77f0j5$m17 at smc.vnet.net>...
>Hi everyone,
>
>Consider the use of FindMinimum when the function to be minimized
>depends on several variables
>
>In[1]:=
>j={{l2,l1,0},{l3,0,l1},{0,l3,l2}};
>e={0.56 -l1 l2,0.48 -l1 l3, 0.42 -l2 l3};
>FindMinimum[Apply[Plus,e^2],{l1,.5},{l2,.5},{l3,.5},Method->Newton,
>Gradient->j]
>
>Out[1]=
>{8.68919*^-23, {l1->.8, l2->.7, l3->.6}}
>
>Does anyone know to avoid having to type in all the variables names and
>starting values?
>I have some problems with 100 variables!
>
>Of course I can construct
>
>In[3]:=
>theta={l1,l2,l3};
>start ={0.5,0.5,0.5};
>startval=Transpose[{theta,start}]
>
>Out[3]:=
>{{l1,0.5},{l2,0.5},{l3,0.5}}
>
>but that is not what FindMinimum is expecting.
>
>--
>
>Albert Maydeu-Olivares Tel. +34 3 4021079 ext. 3099 Faculty of
>Psychology Fax. +34 3 4021362 University of Barcelona E-Mail:
>amaydeu at tinet.fut.es Passeig de la Vall d'Hebron, 171.
>08035 - Barcelona (Spain)
>
>



  • Prev by Date: Re: save 3d-graphics as tiff
  • Next by Date: Re: listplot and notebook directory
  • Previous by thread: typing starting values in FindMinimum
  • Next by thread: Re: typing starting values in FindMinimum