typing starting values in FindMinimum
- To: mathgroup at smc.vnet.net
- Subject: [mg15391] typing starting values in FindMinimum
- From: "Albert Maydeu-Olivares" <amaydeu at nil.fut.es>
- Date: Tue, 12 Jan 1999 03:14:53 -0500
- Organization: University of Barcelona
- Sender: owner-wri-mathgroup at wolfram.com
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)