Thursday, February 21, 2008

calculate min/max in matlab excluding the zeros

the problem is how to calculate the minimum of a vector excluding the zeros?
here is an example how to do that:

min(myVector(myVector > 0))

No comments: