LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the continuous values range from a 2D array?

Solved!
Go to solution

@curiousguy99 wrote:

Thanks a lot for your response!!

I noticed how over complicated my code was 😞 . This was a part of code where the each bit ( from 0-31 ) were assigned a bit definition name.


The code you attached looks very similar to the old code and does not correspond to the image. Did you attach the right file?

 

Yes, as you can see, each row can be processed independently, so there is definitely no need for high Aztec pyramids of FOR loops and 3D arrays and such. 😄

 

(My code was just a quick draft and should be tested for more unusual inputs, of course.)

 

What is the original representation of the "bits"? (just a U32? a boolean array with 32 elements? etc.). Maybe the original representation can be processed directly, without getting the TRUE positions first.

0 Kudos
Message 11 of 12
(330 Views)

@altenbach wrote:

(My code was just a quick draft and should be tested for more unusual inputs, of course.)


One change you might want to make is as follows to avoid a column with only empty strings at the end for certain inputs:

 

GetRanges02.png

0 Kudos
Message 12 of 12
(328 Views)