LabVIEW Idea Exchange

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

Include 'Transpose Array' method in the shortcut menu of a 2D array constant/control/indicator

Status: Completed

Available in LabVIEW 2015 and later

Similar to 'Insert' and 'Delete' methods, please include 'Transpose Array' method as shown below:

 

Method to transpose the array

 


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


16 Comments
moderator1983
Active Participant

Requesting admin to make spelling correction in the title, instead of 'ocnstant' correct it to 'constant'.


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


altenbach
Knight of NI

We already have this option for graphs.

 

Many times arrays are processed by rows, suitable for autoindexing, but they should by presented to the user by colums for a more intuitive look.

 

Of course we probably need a visual indicator to show that the array is transposed to avoid confusion.

 

Darren
Proven Zealot

I corrected the misspelling in the title.

moderator1983
Active Participant

 


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


altenbach
Knight of NI

I was just saying that graphs have a right-click menu to transpose the 2D array data so the graph "looks right" depending on how the data is arranged in memory vs. the way we want to see it.

 

In my opinion, this is closely related to your current idea and offers a precedent, possibly lowering the threshold to implement it also for array containers. It has nothing to do with datatypes.

 

I strongly believe that an indication is needed. Any seasoned programmer knows that 2D arrays are autoindexed one row at a time, so if I have a 2D array diagram constant, I need to know at all times if it is displayed transposed in order to clearly see how the subsequent code will handle it. Otherwise we are flying blind and there are many more places where subtle bugs can hide.

Darin.K
Trusted Enthusiast

> , so if I have a 2D array diagram constant, I need to know at all times if it is displayed transposed in order to clearly see how the subsequent code will handle it.

 

As I read it, this is a suggestion to change the data, not simply the view of the data.  There would not be a "displayed transposed" state like the graphs can have.  Perhaps you are suggesting that there should be one (I think not for the code readability reasons you mentioned).

altenbach
Knight of NI

> As I read it, this is a suggestion to change the data, not simply the view of the data. 

 

Well, since the suggestion wants it for constants, controls, and indicators, this seems like a can of worms. A data sink (indicator!) should not be able to change the data. 

crossrulz
Knight of NI

So, Christian, if we remove the "indicator" part and we are just changing the actual data in the array, what are your thoughts?

 

With that clarification, I find I would use this quite a bit.  Nothing like finding out that you typed in a large 2D array transposed and that you have to retype it (or copy the array make a VI to transpose, copy the new array data, and paste to your original array).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Darin.K
Trusted Enthusiast

> A data sink (indicator!) should not be able to change the data.

 

Well, don't look now, but you can delete rows and columns in indicators already.  But, these options only appear in the Edit-time RCM, not the runtime menu.  I did not suppose this would be any different.  No need to exclude indicators, just keep the item out of the runtime menu.

moderator1983
Active Participant

> A data sink (indicator!) should not be able to change the data.

 

I agree with what Darin has mentioned in his reply.

 

2D array indicator with data manipuating methods


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.