Message Boards Message Boards

How to fix the error message while running this piece of Mathematica?

Hello, my name is David, and I am new in the forum. I am getting an error message while trying to run a piece of Mathematica code to compute the exchange of CO2 between different Earth's compartments. It seems that all variables were defined as well as the system of ODE. However Mathematica returns a message thatNDSolve::derlen: "The length of the derivative operator Derivative[1] in \!(*SuperscriptBox[\"x1\", \"[Prime]\", MultilineFunction->None][t]) is not the same as the number of arguments."

Attachments:
POSTED BY: David Quesada
2 Replies
Posted 9 years ago

Aha! Finally found it!

There are two, in this particular case, almost identical looking characters.

One of those is the desktop published form of \[Rule].

The other is the desktop published form of \[RightArrow].

In your MaxSteps->200 option that you give your NDSolve you are using the second, which means nothing to NDSolve, when you should have been using the first.

You don't realize it, it is impossible to tell, even with a magnifying glass, there is no warning message explaining what the REAL cause of the problem is, and you get what you get.

So you can stop attempting to desktop publish your arrows and just type a "-" followed by a ">", which Mathematica will then translate and desktop publish into \[Rule], or you can type Rule[MaxSteps,200].

POSTED BY: Bill Simpson

Bill Simpson, thank you very much for both, your time and your help.

POSTED BY: David Quesada
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