help-octave
[Top][All Lists]
Advanced

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

Re: Finding the first element that meets a condition


From: Nicholas Jankowski
Subject: Re: Finding the first element that meets a condition
Date: Tue, 10 Mar 2020 14:05:52 -0400

On Tue, Mar 10, 2020 at 2:00 PM Brett Green <address@hidden> wrote:

If you're avoiding a loop, then by default you're going to be applying some operation to the entire array.  Find generally works pretty well.  
 
>> first_element = find(arr_sorted>min_val)(1)
ans = 3

reply via email to

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