help-octave
[Top][All Lists]
Advanced

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

Re: Extracting segents of data from array


From: bpabbott
Subject: Re: Extracting segents of data from array
Date: Thu, 06 Jan 2011 19:16:00 +0000 (GMT)


On Jan 06, 2011, at 02:10 PM, Louis Ciotti <address@hidden> wrote:

On Mon, Jan 3, 2011 at 3:38 PM, Ben Abbott <address@hidden> wrote:
> On Jan 3, 2011, at 3:23 PM, Louis Ciotti wrote:
>
>> Thanks for the quick and accurate response.  Now another question.  Is
>> there a way to identify the rows that are greater than a given value?
>>
>> Say I want to know all the row numbers greater than 0.25.
>
> Assuming your array has multiple rows and one column ...
>
>        m = find (a > 0.25);
>
> If your array has multiple rows and columns, the rows with one or more elements larger than 0.25 ...
>
>        m = find (any (a.' > 0.25));
>
> If you want the rows and columns for elements larger than 0.25 ...
>
>        [m, n] = find (a > 0.25);
>
> Ben

Follow up to this question... Is it possible to locate the row and
column with the maximum value of a m x n matrix?
 
[r, c] = find (a == max (a(:)));

Ben


reply via email to

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