LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I replace several elements of an array within one time? The number of elements are not fixed

Hi all,

 

I want to replace some elements of a 2D array, but the number of elements are not known beforehand. I dont want to do it with a loop, which may slow down the speed, and the update of elements will not happen simultaneously.  The indexes of elements to be updated are not continuous. I wonder if there is a way to do that efficiently? Do I have to programme it in LabWindows/CVI? Thank you.

 

Best wishes,

Bo

------------------------
My blog Let's LabVIEW.
0 Kudos
Message 1 of 2
(2,601 Views)

Use the replace elements function. For non-continuous replacements  of of multiple elements you would nee to iterate at least the number of continous pieces.

 

For example:

 

1,2,3,4,5,6,7,8,9

 

Replace elements 1,2,5,6,8

 

You would need 3 iterations in which you can replace (1,2), (5,6) and (8).

Regards,
André (CLA, CLED)
Message 2 of 2
(2,584 Views)