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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

matrix show indices

StuartBruff
23-Emerald III

matrix show indices

While looking in Mathcad Prime 10 at a worksheet whose ORIGIN = 1, I noticed that with Show Indices turned on, a nested array's indices ran from 0 to rows()-1.

 

I tried to recreate the effect in a blank worksheet, but to no avail ... until I changed ORIGIN without recalculating the evaluated variable.  I initially set ORIGIN = 3, then changed it to 10.

 

2024 10 08 B.png

 

Pressing F5 caused the indices to reflect the change in ORIGIN.

 

2024 10 08 C.png

 

Equally interesting, I saved the worksheet after changing the ORIGIN definition back to 3 (with the indices showing 10..23) and reopened it.  This time, the indices ranged from 0 to 14.

 

On the subject of Show Indices, I would find it helpful to show an array's indices with this setting turned on regardless of the size of the array.  I've found myself on several occasions counting down an array's rows or across its columns when, say, checking the index of an anomalous result.

 

Stuart

2 REPLIES 2
Werner_E
25-Diamond I
(To:StuartBruff)

I can confirm this undesired behaviour.

 

Furthermore I noticed a discrepancy when using the global/worksheet settings for "Show Indices".

When a matrix is displayed these global settings are used and when I click in an empty space in the worksheet and change this setting, the changes are reflected immediately. But when I just resize the matrix, again click some empty space and change the global settings, they don't show any effect anymore. Thats sure not as it should be.

StuartBruff
23-Emerald III
(To:Werner_E)


@Werner_E wrote:

I can confirm this undesired behaviour.

 

Furthermore I noticed a discrepancy when using the global/worksheet settings for "Show Indices".

When a matrix is displayed these global settings are used and when I click in an empty space in the worksheet and change this setting, the changes are reflected immediately. But when I just resize the matrix, again click some empty space and change the global settings, they don't show any effect anymore. 


 

Another fine addition to the collection.

 


@Werner_E wrote:

Thats sure not as it should be.


 

Indeed.   Sometimes these types of "little" bug can be quite dangerous and insidious in their effect.   Misreading ORIGIN is one of my least favourite hobbies.  Many is the snipe hunt (Elwetritsch-Jagd?) I've gone on looking for an "error" that turned out be somebody using ORIGIN = one (rather than zero as Richards (of BCPL fame) and Dijkstra intended).  In my usual brain-in-neutral fashion, I somehow fail to see all the obvious clues, instead relying on little things, such as, say, Shown Indices starting from zero ... 😒

 

Stuart

Announcements

Top Tags