11-20-2008 09:24 AM
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
11-20-2008 10:39 AM
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).