07-25-2006 08:27 AM
Dear friends
I have two input arrays; say sq and pd .each of which is 1000 points in length
sq is a square wave pulse and it was fed into a system and the output was recorded
in  the pd one. I would like to read the results from the pd arrays 
when  the sq value become between 3.5 and 5 so I have written this math
script codes:
             uInt32 i;
              
             uInt32
pos_1;
             uInt32
pos_2; 
        
            for
(i=0;i=1000;i++)
           {
            if (
(sq[i]>=3.5) && (sq[i]<=5))
            pos_1[i] =
pd[i];
            
             else
             
pos_2 = pd[i];
when I run I received the following error:
array type required 
pos_1[#i] which means it does not recognized pos_1[i]
any ideas please
07-25-2006 08:47 AM
07-25-2006 11:55 AM - edited 07-25-2006 11:55 AM
@rumayan wrote:
any ideas please
Well, I would strongly suggest to abandon the formula node, LabVIEW can do these things much better using wires (seriously!) 😄
Attached is a quick attempt, modify as needed. (It would also be easy to modify such that the output arrays don't contain zeroes if the other output array receives data).

Message Edited by altenbach on 07-25-2006 09:56 AM
07-26-2006 01:07 PM