LabVIEW

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

how to extract one dimension out of a two dimensional array

Solved!
Go to solution

Hello,

May be this question is too naive and simple.I have a two dimensional array (two columns and 256 rows). All I want is to extract one of these columns as a separate one dimensional array. It seems like a very very basic task that any programming language should address. However, I could not find the right funciton in the array functions list. I am sure I am missing something very obvious. I tried index array, array subset, array to cluster and reshape array. None of them is the right function for this purpose. I have used LabVIEW for a quite a while now, but still I can not find a solution to this basic problem. Can someone help me out.

 

Thanks

 

 

0 Kudos
Message 1 of 8
(7,020 Views)
Solution
Accepted by topic author Jahan
08-27-2015 04:09 PM

Hi -

 

With the Index Array  function have you tried wiring a number to the input labeled index (col)?

 

See the attached vi for an example.

Message 2 of 8
(7,017 Views)
Let me know if that is what you need. :-)
0 Kudos
Message 3 of 8
(6,995 Views)

Yes. That is exactly what I wanted to do. Thank you. I could not open your VI because I have LabVIEW 7. However, I understood from your explanations. I was getting confused by the word "disabled" in "disabled index (col)". After setting that to 1 (meaning my second column) I coudl extract the second column. Thank you for the help.

 

Jahan

0 Kudos
Message 4 of 8
(6,985 Views)

Hi Jahan,

 

next time you should mark the correct message as solution - and not your own reply...

Best regards,
GerdW
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

Message 5 of 8
(6,977 Views)
Sorry about that. I tried correcting it but didn't work. I will keep that in mind for the future.
0 Kudos
Message 6 of 8
(6,970 Views)

Jahan wrote:
Sorry about that. I tried correcting it but didn't work. I will keep that in mind for the future.

Go to the options menu to the upper right of your reply and select "Unmark solution"

 

Then you can mark the correct reply as the solution.

Message 7 of 8
(6,963 Views)

Works perfectly fine! Thanks!!!

0 Kudos
Message 8 of 8
(2,156 Views)