Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Index of a Matrix

Status
Not open for further replies.

SubseaEng10

Mechanical
Feb 9, 2010
6
Hi all,

I am trying to find an index of a matrix with a conditin.

let say:

M=(-10,-8,-5,-3,-2,1.5,3,4,8)

I want to find the first index of this matrix which its value is greater than 0.
So in matrix M, the return value should be 5 (corresponds to 1.5).

could anyone suggest the sloution.

Thanks.
 
Replies continue below

Recommended for you

Status
Not open for further replies.

Part and Inventory Search

Sponsor