help-octave
[Top][All Lists]
Advanced

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

Re: min Into range Array


From: Pantxo
Subject: Re: min Into range Array
Date: Tue, 2 Oct 2018 15:21:05 -0500 (CDT)

turbofib wrote
> look that:
> 
> a=[ 3  1 8 2; 5  7 8 3;7 8 9 6;0 2 6 1]
> 
> i need to search min between 2 index
> 
> example:
> 
> 
> 
> min between position 2 and 4 element
> 
> RIS=1 3 6 1  (1 is min between 1 8 2, 3 is min between  7 8 3, 6 is min
> between 8 9 6....
> 
> it's possible to do this avoid loop?
> 
> thank very
>  
> 
> 
> 
> --
> Sent from:
> http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html

Hi,

a=[ 3  1 8 2; 5  7 8 3;7 8 9 6;0 2 6 1];
b = min (a(:,2:end), [], 2)

Pantxo



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

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