cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

MATHCAD 15 This value must be an integer error.

KG_10853734
2-Explorer

MATHCAD 15 This value must be an integer error.

I am trying to run the code but at this section

KG_10853734_0-1701962500679.png

I get this error. Why?

1 REPLY 1
LucMeekes
23-Emerald III
(To:KG_10853734)

You use k(q) as an index into the array depsj. An index must be an integer value, so you need to make sure that k(q) is an integer for every value of q you feed to it.

Note that when q is not an integer, chances are high that for at least one value of q, k(q) will not be an integer, due to limited accuracy of numeric values (Mathcad has only about 15 digits of precision...). Making use of the round(), floor() or ceil() functions may help.

 

Success!
Luc

Announcements

Top Tags