Message Boards Message Boards

Need help to resolve an error

Posted 11 years ago

I am working on modelling and trying to fit data to a model. But while I am getting an error saying "One or more weight values are not non-negative numbers. Weight values \must be non-negative"

Can someone help me to resolve the issue. I am attaching the mathematica notebook for the reference.

Waiting for an urgent response.

Thanks in advance, Jaydeep

Attachments:
POSTED BY: Jaydeep Yadav
4 Replies

I took a quick look at your notebook. However, it is hard to discern what's going on, partially because all the information needed is not there: i.e., Pdiff, Vb, and Fuc are not defined. Also you have two different numbers of arguments for Model3 in its definition (one in its left hand sice and one in its memoization internally). I cannot seem to get an example of just executing Model3 working... can you fill in the details and show some working examples of Model3 working?

POSTED BY: David Reiss
Posted 11 years ago

hi, I am attaching a new mathematica file, that has all the required parameters and values and it has an solved example for the model3. Please let me know if are able to resolve the error, Thanks

Attachments:
POSTED BY: Jaydeep Yadav

The form of your data in your original file, Error file.nb, is of the form

{
   {{_,_,_}...}
}

whereas the form of the data in your recent example file reply.nb is of this form:

 {{_,_,_}...}

When I take the first part of the data in your original file so that the form that is being supplied to the first argument of the NonlinearModelFit function is like the one in your second notebook, {{,,_}...}, then I no longer get the "non-negative numbers" message (but I do get a variety of InterpolatingFunction messages as well as some warning from NDSolve pertaining to some difficulty in the convergence of the numerical methods used by NDSolve).

POSTED BY: David Reiss
Posted 11 years ago

Hi, Thanks for the reply. I am getting the same error in another file. Here I am using the data in this format {{,,_}...} but still its not working. Can you please look into it. I have attached the mathematica file Thanks

Attachments:
POSTED BY: Jaydeep Yadav
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