[scilab-Users] test if a value is between two others
Frederic Jourdin
frederic.jourdin at shom.fr
Thu Mar 10 12:20:34 CET 2011
Hi,
can you try this ?
TousLesIndices= find( abs( T - a) < tolerance);
Fred
Loïc GIROD a écrit :
>
> Hi everyone,
>
> I’m trying to test if a value a can be located in an array of values
> (named T). As my reference value a can not be really equal to a value
> in T(i), I apply a tolerance factor.
>
> So, I have to know if my value T(i) is between a+tolerance and
> a-tolerance.
>
> I’ve tried the following code :
>
> for i=1:size(T)
>
> if T(i)>=a+tolerance
>
> then if T(j)<=ae-tolerance then location=i
>
> end
>
> end
>
> end
>
> I get an error 34 and I don’t understand how to solve it. I’ve tried
> while function, but it returns nothing.
>
> Could someone help me ?
>
> Many thanks
>
> Best regards
>
> Loïc
>
More information about the users
mailing list