04-22-2012 11:37 AM - edited 04-22-2012 11:41 AM
First of all this is not "finding the min value in the array"
This is:
I have an array which changes its values every iteration and I want to compare the new values with the previous values and make a new array with the minimal values...
In C++ it would be like this:
int main(){
int array[8];
int min[8];
int i;
for(i=0;i<8;i++){
min[i]=1000000;//Initialize minimun array with a high value
}
while(1){
array=update_array();
for(i=0;i<8;i++){
if(array[i]<min[i]){
min[i]=array[i];
}
}
//do stuff....
}
return 0;
}
Im new to labview and it still confuses me a lot...
thanks in advance.
Solved! Go to Solution.
04-22-2012 12:17 PM
Use of the regular Max & Min function (not Array Max & min as you are aware) with arrays and a shift register will do job nicely. Max & Min, like most numeric functions, is polymorphic and works witt arrays as well as scalars.
Lynn