What is causing the NMinimize error in my Mathematica calculation?

  • Thread starter Thread starter gaby287
  • Start date Start date
  • Tags Tags
    Mathematica
gaby287
Messages
14
Reaction score
0
What wrong with my calculation.the problem is from the attachment.
It keeps saying:
NMinimize::nnum: "The function value {10721.1} is not a number at {rs,x} = {1.91862,1.66351}. "

My code:

XDDO154[x_, rs_] :=
Sum[(DDO154vobs[] -
Sqrt[(4 Pi*(43.040600502)*x*
rs^(3)/(DDO154pc[]))*(-DDO154pc[]/(DDO154pc[] +
rs) + Log[((DDO154pc[] + rs)/rs)])])^2/
DDO154err[], {i, 1, 61}]

NMinimize[{XDDO154[x, rs], 0 < x && 0 < rs}, {x, rs}, Method -> "DifferentialEvolution"]

(DDO1254pc, DDO154err are tables)
 
Physics news on Phys.org
What do DDO154vobs, DDO154pc, and DDO154err look like?
 
They are tables of one column with numbers, like velocity, distance and errors.
 
Forget it¡ Something was wrong with my table. Thanks¡
 

Similar threads

Replies
1
Views
2K
Replies
3
Views
2K
Replies
11
Views
2K
Replies
13
Views
2K
Replies
3
Views
4K
Replies
3
Views
4K
Replies
1
Views
2K
Back
Top