Skip to main content
Best answer by Werner_E

Here is the bug shown with a very simplified example. It has to do with the nested loops (which should have no effect whatsoever in this example). Omitting either loop will make it work.

16.02.png

3 replies

25-Diamond I
February 16, 2014

In my opinion it should work so I tend to call it a bug and you should report it to PTC.

I tried two easy workarounds which both work as expected:

  1. add the line "M <-- M" on top of your routine
  2. turn your routine into a function with at least M as parameter. I would add id as second parameter, n could be calculated from the matrix dimensions.

BTW, instead of the for loop (the first with variable j) you may consider using the new row select operator in combination with transposition.

Addendum: Its the for-loop which sets some matrix elements to infinity which throws the error. If you delete it (the routine won't give the expected results then, I know), M is accepted as matrix again. I am pretty sure that it is a bug!

Werner_E25-Diamond IAnswer
25-Diamond I
February 16, 2014

Here is the bug shown with a very simplified example. It has to do with the nested loops (which should have no effect whatsoever in this example). Omitting either loop will make it work.

16.02.png

24-Ruby IV
February 16, 2014

Thanks, Werner - it is a bug!

25-Diamond I
February 16, 2014

Valery Ochkov wrote:

Thanks, Werner - it is a bug!

Yes, I am quite sure about that now. I assume you will report it to PTC.

24-Ruby IV
February 17, 2014

One more.

I can write in Mathcad M[(i ,j) but cannot in Prime.

25-Diamond I
February 17, 2014

I see, obviously lists are allowed in Prime only with prepended function name. But I am not sure if we should call this a bug.

What would the reason for using M[(i,j) be? You could write M[(i),(j) - this is allowed.

24-Ruby IV
February 18, 2014

Werner Exinger wrote:

I see, obviously lists are allowed in Prime only with prepended function name. But I am not sure if we should call this a bug.

What would the reason for using M[(i,j) be? You could write M[(i),(j) - this is allowed.

It is for better reading a sheet - see the picture.

But the Prime converter deletes those parentheses but does see the attch.

nva15.png