LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Comparing two results from same array

For a project I am doing, I need to compare two co-oridnates that will be inputted into an array. The co ords in question are the first x and y, and the last x and y. The array will look as such (x1,y1,x2,y2,x3,y3 etc....). How do I choose the first and last two intergers of the array? Also the array will vary in length each time I run it.

0 Kudos
Message 1 of 2
(1,013 Views)

Hi mugulous,

 


@mugulous wrote:

How do I choose the first and last two intergers of the array? Also the array will vary in length each time I run it.


You need exactly two functions: ArraySize and IndexArray.

ArraySize gives you the size of the array, and using just one (!) IndexArray you can get the elements with indices (0, 1, size-2, size-1)…

 

What have you tried so far? Where are you stuck?

This sounds like homework to actually learn LabVIEW: did you notice the Training resources in the header of the LabVIEW board?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 2
(976 Views)