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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Issue with for statement (MC15)

ifomenko
15-Moonstone

Issue with for statement (MC15)

Hi

Something strange, very simple example, nothing special, but it doesn`t work

Error.png

MC15 file is attached, thanks in advance

4 REPLIES 4
LucMeekes
23-Emerald III
(To:ifomenko)

Try:

LucMeekes_0-1580042916959.png

Success!
Luc

ifomenko
15-Moonstone
(To:LucMeekes)

Many thanks, Luc

Your is way works.

Just for info everything is right when it is not a function

Error2.png

Werner_E
25-Diamond I
(To:ifomenko)


@ifomenko wrote:

Many thanks, Luc

Your is way works.

Just for info everything is right when it is not a function

 


No, not at all! 😉

You confuse numerical and symbolic evaluation.

Everythings is OK if you use numeric evaluation - even in your posted sheet with the function.

Its the symbolic evaluation which causes the error and this error also occurs if you don't turn it into a function.

As the very same error also occurs in Prime 6 with the old (muPad) and the new (FriCAS) symbolic processor and probably also in Luc's MC11 with Maple, it looks like the problem is not the symbolic processor itself but the interface between Mathcad and the symbolic which obviously will only accept scalar values for enumeration types.

So I guess we can call it a Mathcad & Prime bug.

 

 

ifomenko
15-Moonstone
(To:Werner_E)

Thanks, you are right. I know about difference in behaviour between num and symb engines and I tested this example on numeric case. It has the same issue. But I think I was not very attentive. Now I see that everything is ok with numeric evaluation.

Thank you, you are very thoughtful 🙂

Announcements

Top Tags