help-octave
[Top][All Lists]
Advanced

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

Re: Abs highest(extreme) value in a matrix with +ve & -ve elements


From: Ben Abbott
Subject: Re: Abs highest(extreme) value in a matrix with +ve & -ve elements
Date: Mon, 23 Jan 2012 09:54:31 -0500

On Jan 23, 2012, at 8:31 AM, adla.raghu wrote:

> Hi sorry for any confusion. 
> 
> By saying "extreme value" I meant if we consider the range of the values on
> a number scale
> 
> Eg: A(:,1) = [1,3,-5,9,-7,10]  are arranged as -7,-5,1,3,9,10 where  10 is
> the extreme value 
> 
>     A(:,2) = [1,3,-5,9,7,-10] are arranged as -10, -5, 3, 7,9 where -10 is
> the extreme value 
> 
> So if I say min(A) it returns -7,-10   but the extreme values are 10, -10
> And if I say max(A) it returns 10, 9 but the extreme values are again 10,
> -10
> 
> I hope this makes sense
> 
> thanks

I'm not sure, but does this work ?

        [Amax, nmax] = max (abs (A));
        Extremes = [-Amax; Amax]

Ben



reply via email to

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