LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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
(16,764 Views)
Solution
Accepted by topic author Jahan

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
(16,761 Views)
Let me know if that is what you need. 🙂
0 Kudos
Message 3 of 8
(16,739 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
(16,729 Views)

Hi Jahan,

 

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

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 8
(16,721 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
(16,714 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
(16,707 Views)

Works perfectly fine! Thanks!!!

0 Kudos
Message 8 of 8
(11,900 Views)