LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

extracting multiple arrays from a 1D array

Solved!
Go to solution

Hi,

I tried both codes (again thank you all).
I couldn't load the snippet because I'm using an earlier version..
@ crossrulez: I don't get only the "squared signal" values out of your code, but I get the whole signal divided into subarrays and each array contains one of the square signals. There's no problem to again extract the only square signal in each array.. now it's easier. But may be I missed something in the code (?)
@ jwscs: What do you mean by fixed corner cases? I tried your code, and I couldn't get what i want .. don't know exactly what I did wrong. Did you get out the correct array values?

 

 

Download All
0 Kudos
Message 11 of 18
(1,136 Views)

In your attempt of doing my code, your FOR loop is wrong.  You used Replace Array Subset when you should have use Array Subset.  What the icons carefully.


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
0 Kudos
Message 12 of 18
(1,127 Views)

..Oh yes..sure!! now it works of course! Thank you very much crossrulz!

0 Kudos
Message 13 of 18
(1,125 Views)

you missed the "Transpose 2D Array" after reading from spreadsheat

EDIT: 'fixed corner cases' was added by me, because i edited my post and replaced the first snippet with a newer one


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 14 of 18
(1,119 Views)

wrote:

you missed the "Transpose 2D Array" after reading from spreadsheat

EDIT: 'fixed corner cases' was added by me, because i edited my post and replaced the first snippet with a newer one


Great. Thanks!!

0 Kudos
Message 15 of 18
(1,108 Views)

LabVIEW does not support "ragged" 2D arrays, so all rows will be padded to the longest row. You can do a 1D array of clusters, each containing a 1D array to have each "row" a different length.

 

What exactly is so interesting in this data that you need to keep it all? What are you planning to do with the result? Wouldn't it be sufficient to just keep e.g. the time of the OFF-ON transition and the length of the ON time for each?

0 Kudos
Message 16 of 18
(1,092 Views)

@altenbach wrote:

LabVIEW does not support "ragged" 2D arrays, so all rows will be padded to the longest row. You can do a 1D array of clusters, each containing a 1D array to have each "row" a different length.

 

yes.. thanks for the tip!

 

What exactly is so interesting in this data that you need to keep it all? What are you planning to do with the result? Wouldn't it be sufficient to just keep e.g. the time of the OFF-ON transition and the length of the ON time for each?

 

It's the data coming out of one channel during an ultrasonic measuring procedure. The length of the echoes should be measured (of each of those 1D arrays) and serve as a reference for other simulated values. I don't know how to detect the On to Off transition time.. isn't it the same idea as what is in the solution code?
would be great if u reply!


 

0 Kudos
Message 17 of 18
(1,059 Views)

Detecting on-off transitions is very similar to detecting off-on transitions.

 

(sorry, I won't be near a computer for a while...)

0 Kudos
Message 18 of 18
(1,048 Views)