> -----Original Message-----

> From: Help-octave [mailto:help-octave-

> bounces+allen.windhorn=

[hidden email]] On Behalf Of turbofib

>

> i've the following array:

>

> a=[-3 -5 0 5 4]

>

> i want to loop it until i find element>0 (5)

>

> can I loop it but is there a faster method?

>> a=[-3 -5 0 5 4]

a = -3 -5 0 5 4

>> a(a>0)

ans =

5 4

>> a(a>0)(1)

ans = 5

Regards,

Allen