On 2/9/19 5:58 AM, LucaLuca wrote:

> f=[1 2 3 4 4 7 7 6 8 5]

>

> it's possible to find >1 egual element? i want to know this position

>

> f(4)=4 f(5)=4

>

> f(6)=7 f(7)=7

>

> Ans=4,5

> 6,7

I am genuinely curious---there's what looks like to be a group of

Italian gentlemen:

[hidden email]
[hidden email]
[hidden email]
that regularly ask about Octave problems that, to me, share some common

characteristics, in that they explore the intricacies of syntax, in ways

that don't seem to be connected to actual practical problems. To me, it

looks like either someone's exploration of intricacies of Matlab, or a

series of homework etudes. It actually occurred to me that it could be a

Google algorithm similar to Alpha Zero

http://science.sciencemag.org/content/362/6419/1140 , trying to learn

mathematical computing :), especially since when I tried to answer one

of them (the last one) directly the email address bounced.

But, hey, let's play along. I am not sure that I understand the problem

as stated above but maybe something along the lines of

k=1:length(f)

find(f(k)==k)

or

find(f(k)!=k)

would be a solution.