Hi,
I have a for loop in which I create array whose size is variable depending on the condition. I want to append the value of array from each iteration into output array. The output array size is pre-fixed and is initialized outside of array. In for loop I am using Replace array subset to write values from intermediate array to output array. However, I need a variable which I can use as index to write to replace array at specific points and update it according to the number of elements written in current iteration. This way I can avoid overwritting on same array elements. In short, this is how it would look like in C#.
int j = 0;
for(int i=0; i<inputArraySize;i++)
switch{
case 1: outputArray[j] = inputArray[i]; j++; break;
case 2: outputArray[j] = inputArray[i]; j++; outputArray[j] = somethingElse; j++; break;
}
return(outputArray);
I dont know how to do this in Labview. Any help is appreciated.