Group Abstract Group Abstract

Message Boards Message Boards

0
|
8.2K Views
|
6 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Please help me solve this error from NonlinearModelFit

Posted 11 years ago

HI, I am trying to fit a model, but I am getting an error. Please help me out of this. I have attached the mathematica file for the reference.

Thanks

Attachments:
POSTED BY: Jaydeep Yadav
6 Replies

Without working though your Model9 in detail I cannot say what's going on here. I would recommend debugging your Model9 so that it executes properly before trying it out in the NonlinearModelFit

POSTED BY: David Reiss
Posted 11 years ago

I can't run your notebook because I don't have the file which is imported. But the error you see, "1 is not a valid variable," is occurring because the fit parameter symbols were previously set to numerical values. For example, Cb0 is used as a fit parameter variable, but was earlier set with Cb0 = 1. The variables given to NonlinearModelFit must not have previously defined values.

POSTED BY: David Keith
Posted 11 years ago

HI, I tried fixing that. But still I am getting an error. I have attached a changed file for reference. Please help me to solve the error

Thanks,

Attachments:
POSTED BY: Jaydeep Yadav
POSTED BY: David Reiss
Posted 11 years ago

HI, Thanks for the reply. I fixed that error and now I am getting another error. can you please look into it? I have a new file attached.

Thanks,

Attachments:
POSTED BY: Jaydeep Yadav

From your output you can see that Cb0 has a value (it is 1 and is set at the top of your notebook). That is what the error is telling you. The variable that you use to fit cannot have a value.

POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard