Re: typing starting values in FindMinimum
- To: mathgroup at smc.vnet.net
- Subject: [mg15497] Re: typing starting values in FindMinimum
- From: "Dale Horton" <daleh>
- Date: Mon, 18 Jan 1999 04:22:43 -0500
- Organization: Wolfram Research, Inc.
- References: <77f0j5$m17@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
For 100 variables all starting at .5 theta=Table[ToExpression["l"<>ToString[i]],{i,100}]; start=Table[.5,{100}] startval=Transpose[{theta,start}] Apply[FindMinimum[Apply[Plus,e^2],#,Method->Newton,Gradient->j]&, startval] -Dale 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) > >