| Author |
Comment/Response |
Julius Su
|
11/07/03 6:34pm
Hello, I have a short piece of Mathematica code (written to reproduce
the difference) that behaves differently between v4.2 and v5.0.
Under v4.2:
In[1]:= f[b_] := FindMinimum[(x - a)^2 + (b + a^2), {x, 0}][[1]]
In[2]:= FindMinimum[f[1], {a, 1, 1.1}]
-16
Out[2]= {1., {a -> 4.78784 10 }}
Under v5.0:
In[1]:= f[b_] := FindMinimum[(x - a)^2 + (b + a^2), {x, 0}][[1]]
In[2]:= FindMinimum[f[1], {a, 1, 1.1}]
FindMinimum::nlnum :
The function value {1. a, 1. (0.-1.a)} is not a list
of nummbers with dimensions (2) at {x} = {0.}.
FindMinimum::nnum : The function value
2.+(-1.+x)2 is not a number at {a} = {1.}.
Does anyone know how to change the code so it will work under v5.0? (the actual problem is lengthier, but this code fragment reproduces the desired behavior).
Thanks,
Julius
jsu@caltech.edu
URL: , |
|