[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: about the minimum of elements of a matrix
From: |
Jaroslav Hajek |
Subject: |
Re: about the minimum of elements of a matrix |
Date: |
Mon, 27 Dec 2010 10:52:56 +0100 |
On Tue, Dec 21, 2010 at 11:00 AM, CdeMills <address@hidden> wrote:
>
>
> Martin Helm wrote:
>>
>>
>>>
>> This will show the first element which has the minimum value. If all index
>> pairs are of interest where the matrix has its minimum value:
>>
>> val = min(A(:));
>> [i,j] =ind2sub(size(A),find(A==val));
>>
>>
>
> The problem with 'find' is that it may return a vector instead of a scalar.
So what? ind2sub can perfectly handle a vector as well.