02-01-2006 11:08 AM
02-01-2006 02:02 PM
02-02-2006 09:48 AM
Hello,
I am passing an array of size two; and the array is never empty, it is always pouplated before being passed to the script; the funny thing is, the script would run fine , then it would suddenly stop working generating this error, and if I just press enter to add a blank line inside the script , it starts running fine again !!
here is the code :
///////////////////////////////////////////////////////////////
j=1;
p=select_prob(j);
while(p<r)
j=j+1;
p=p+select_prob(j);
end;
j=j-1;
///////////////////////////////////////////////////////////
select_prob is 1-D array of size two , in this case; r is a scalar, and j supposed to be the script's output.
Appreciate your help.
02-02-2006 10:21 AM
02-02-2006 11:15 AM
Thanks for the feedback; r is an input to the script; it is a randomly generated variable btwn [0,1]; I will look into the case when r is larger than either entries in array.
I am a newbie to LABVIEW , and sometimes I found it easier to use a script rather than using a while loop. Do you know if that would affect the running speed of the code ?
02-02-2006 11:35 AM
02-02-2006 11:46 AM