Message Boards Message Boards

0
|
9413 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

NonlinearModelFit nrlnum error (not a list of Real numbers)

Posted 11 years ago
I am trying to fit some basic data to a complicated equation emoticon- here are the data points:
data={{0.12, 488.919}, {0.14, 429.077}, {0.16, 360.357}, {0.18, 308.689}} ...
so on and the equation have got Hypergeometric2F1 f?nctions.
So to fit this data: 
NonlinearModelFit[test,
f[a, \[Alpha], Vr, Vi, Elab], {a, \[Alpha], Vr, Vi}, {Elab}, MaxIterations -> 1000]

But I keep getting this error: 
Roots::ivar: Elab_ is not a valid variable. >>
NonlinearModelFit::nrlnum: The function value {-10.+(91.1962 (1. -1. 2.71828^(4. Im[<<1>>])))/Pattern[1.,_],-0.2+(91.1962 (1. -1. 2.71828^(4. Im[<<1>>])))/Pattern[2.,_]} is not a list of real numbers with dimensions {2} at {a,\,Vr,Vi} = {1.,1.,1.,1.}. >>
NonlinearModelFit::nrlnum: The function value {-10.+(91.1962 (1. -1. 2.71828^(4. Im[<<1>>])))/Pattern[1.,_],-0.2+(91.1962 (1. -1. 2.71828^(4. Im[<<1>>])))/Pattern[2.,_]} is not a list of real numbers with dimensions {2} at {a,\,Vr,Vi} = {1.,1.,1.,1.}. >>

Does anyone know what I am doing wrong?

Please, help me. I'm about to go crazy emoticon
POSTED BY: Esra Acmaz
Look in
    The function value {-10.+(91.1962 (1. -1. 2.71828^(4. Im[<<1>>])))/Pattern[1.,_],-0.2+(91.1962 (1. -1. 2.71828^(4. Im[<<1>>])))/Pattern[2.,_]} 

The warning says it is not a list of Real numbers and there are two things that are not Real numbers,
Pattern[1.,_]  and  Pattern[2.,_].

My suspicion is that in your expression "test" you have two variable names with underscores after them,
example: q_ and r_, and the variables are set to 1. and 2. so the results are 1._ and 2._ .
POSTED BY: Bruce Miller
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract