Skip to main content
8-Gravel
February 7, 2018
Solved

How to assign a numerical value to the function to continue, when a calculation does not converge?

  • February 7, 2018
  • 1 reply
  • 1693 views

the ordinate values for W(D,M) exceeds 10^307 at some points in calculation. I want to assign 10000 to W(D,M) in those cases. Please see attached mathcad file. Thanks for A to A.

Best answer by Werner_E

You are using "on error" the wrong way.

It has to be the first statement (otherwise the error occurs and your routine fails) and calculation which may fail is on the RHS, not the LHS.

The following should do the job, but on first sight it looks to me that the value of M does not influence the result.

bild.png

1 reply

Werner_E25-Diamond IAnswer
25-Diamond I
February 7, 2018

You are using "on error" the wrong way.

It has to be the first statement (otherwise the error occurs and your routine fails) and calculation which may fail is on the RHS, not the LHS.

The following should do the job, but on first sight it looks to me that the value of M does not influence the result.

bild.png

8-Gravel
February 8, 2018

Thank you very much Werner_E  !!!!!