PDA

View Full Version : Solved: need help with finding the minimum in a 1D array



qpham26
03-07-2013, 01:04 PM
Hi guys, can someone help me with the method of finding the minimum number in a 1D array.
preferably without the use of built-in function

can this be done with loops and if structure?

thanks a lot

patel
03-07-2013, 01:14 PM
minval=myarr(0)
for j=1 to ubound(myarr)
if myarr(j) < minval then minval=myarr(j)
next

Bob Phillips
03-07-2013, 03:59 PM
minval = Application.Min(myarr)