ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple question about Array subset

Solved!
Go to solution

Well guys, I have an array with 1000 numbers and I want to split it in 10 arrays with 100 numbers each

My question is:

 

In array subset I can put the index and the length, in the first array subset I put index 0 and length 100, I think it will start at index 1, since 0 don't exist, right?

so in the next one I put the index 100 and it will start from index 101, or I have to put index 101 to start in 101??

because the length will always be 100.

 

Example:

 

1000/10 = 100

So I have to create 10 arrays with 100 number in each

 

Sincerely,

Eduardo

 

 

 

0 Kudos
Message 1 of 5
(2,752 Views)
Solution
Accepted by topic author EduU

LabVIEW arrays are 0 based, so the first element has index 0. Element 101 has index 100. So yes, you have to specify index 100 and length 100 to get elements 101..200.

 

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

Thanks dan_u!

 

So it will be like this:

 

1º:  0-100

2º:100-100

3º: 200-100

4º: 300-100

5: 400-100

6º: 500-100

7º: 600-100

8º: 700-100

9º: 800-100

10º: 900-100

 

Right?

0 Kudos
Message 3 of 5
(2,746 Views)

If your list is index-length then yes.

 

0 Kudos
Message 4 of 5
(2,743 Views)

Yes, I thought on type it but I forgot!

 

Thanks dan_u!

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