Skip to main content
1-Visitor
December 17, 2015
Solved

choose minimum positive number

  • December 17, 2015
  • 2 replies
  • 5030 views

hi

for example if A=(a,b,c,d,e) and a=1, b=-3, c=4, d=2, e=-1,

how can I choose "d"(minimum positive number biger than one)

"A" is matrix

Best answer by ValeryOchkov

2 replies

24-Ruby IV
December 17, 2015

PS Without zeros!

Or a little program

mjalali-21-VisitorAuthor
1-Visitor
December 17, 2015

thanks

mjalali-21-VisitorAuthor
1-Visitor
December 17, 2015

yes this way is better,tanks alot

25-Diamond I
December 17, 2015

Maybe that way:

But using the built.in functions match and trim you get into troubles if all values in A a bigger than 1.

Solution can be to write a program for your task or rewrite match and trim to work even if nothing has to be trimmed.

Werner

mjalali-21-VisitorAuthor
1-Visitor
December 17, 2015

Capture.JPGif I have this matrix how can I choose 4.97?

24-Ruby IV
December 17, 2015