LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cut from 2D array

Solved!
Go to solution

It's easy to cut a specific part from 1D array.. using the delete from array function or subset array. 

But how can I Cut from 2D array!!

for example the hatched part of the attached photo

0 Kudos
Message 1 of 5
(2,920 Views)

Array Subset will work with 2D arrays.

You'll need to set the row index, number of rows, column index and number of columns.

 

For the example you give, that might be something like "225, 15, 0, 2". If you leave any unwired, you'll get all of that thing (so you could also in the example above just wire "225, 15" and leave the column index/length unwired.

 

Example_VI.png


GCentral
Message 2 of 5
(2,903 Views)

It still not possible for me, 

 

I have attached my code and the data file. 

I would like to cut for example 100 value from the output file and write it in anew output file. 

can you check !!

Download All
0 Kudos
Message 3 of 5
(2,897 Views)
Solution
Accepted by topic author Khallod

Well, in your VI I see the 2D array just before the Write Delimited Spreadsheet call, but there's no Array Subset connected to that wire.

 

If you'd like to write a second file with a subset, you can branch that wire, connect it to the Array Subset function, and wire the appropriate values.

Something like this, maybe?

 

index2darray.png


GCentral
0 Kudos
Message 4 of 5
(2,887 Views)

thank you, 

But I already solve the problem as the attached

0 Kudos
Message 5 of 5
(2,879 Views)