Group Abstract Group Abstract

Message Boards Message Boards

0
|
9.3K Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Use FindRoot for the following function?

Posted 7 years ago
Attachments:
POSTED BY: Robert McHugh
2 Replies
Posted 7 years ago

Yep, that fixes it. Using the line below solves the problem.

FindRoot[ 130 == calcTresAtTime[x, 0.4, 300.], {x, 0.01, 80}]

This is perfectly reasonable for this application. And produces the result

{x -> 63.9137}

Thanks!

POSTED BY: Robert McHugh

The problem is that x == 0. is the starting point you provide and calcTresAtTime[0., 0.4, 300.] sets the coefficient MCpRes and parmsClr to 0., which clobbers the derivative terms in the ODE. Hence the NDSolveValue error. You could start the root search at 1 or higher.

(Plot uses "open" sampling; that is, it does not plug in the end point but use points just slightly inside the interval. It also suppresses some error messages.)

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