Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng 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
Joined
Feb 9, 2010
Messages
6
Location
GB
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top