Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



find position in a vector
Posted:
Jul 22, 2013 11:56 AM


Hello there,
I have a vector of
>> x = [200;500;400;480;900;560;820;0]
I want to have a vector Y that x > 200. So I wrote
>> y = x(x > x(1))
So I get "500 400 480 900 560 820"
It returns me a value. But I need to know a position e.g.
I need the return of y = [2 3 4 5 6] not y = [ 500 400 480 900 560 820];
How should I do in this case? It is quite simple but I really have no idea.
Thank you
AV.



