From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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
(686 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
(649 Views)