cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Find minimum non zero value in a matrix

oguest
1-Newbie

Find minimum non zero value in a matrix

Hi, is there an easy way to find the non zero minimum in a matrix?

Or is a loop the only way to do it?

This is what i have at the moment.

nonzeromin.png

5 REPLIES 5
StuartBruff
23-Emerald II
(To:oguest)

Oliver Guest wrote:

Hi, is there an easy way to find the non zero minimum in a matrix?

Or is a loop the only way to do it?

This is what i have at the moment.

Try this ..

Stuart

MikeArmstrong
5-Regular Member
(To:oguest)

Maybe a user defined function could work for you.

Mike

oguest
1-Newbie
(To:oguest)

Thanks for the suggestions guys. I realized that I needed to have a tolerance in there as some of my values were very close to zero. So I went for this:

minNZ.png

StuartBruff
23-Emerald II
(To:oguest)

Hi Oliver,

Is b guaranteed to be  non zero or an in-tolerance X to never be negative?

Stuart

oguest
1-Newbie
(To:oguest)

Hi Stuart,

Yes for this particular task it wont ever be negative or exactly zero.

Oliver

Top Tags