help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Find egual number


From: Przemek Klosowski
Subject: Re: Find egual number
Date: Mon, 11 Feb 2019 14:38:46 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

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:

address@hidden

address@hidden

address@hidden

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]