Question: finding minimum value

if i define

 

r[1]=4

r[2]=-7

r[3]=2

r[4]=-1

 

how can I find the number r that is the minimum, and define it as x?

so in this case, the minimum is -7 (r[2]), so i would want to define x as 2. 

Please Wait...