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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

choose minimum positive number

mjalali-2
1-Newbie

choose minimum positive number

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

1 ACCEPTED SOLUTION

Accepted Solutions

12 REPLIES 12

PS Without zeros!

Or a little program

thanks

yes this way is better,tanks alot

Capture.JPGthis program dont work

use not a but Re(a) please

L.sw=A

thanks alot but I want to choose only from real number not from Imaginary numbersCapture.JPG

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

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

In this case you need to use "match ()" built-in function:

Pic_1.png

Top Tags