%Need to pick a random cell on the grid to have rain fall function location = rain(x,y) rval1 = rand(); rval2 = rand(); xloc = ceil(x*rval1); yloc = ceil(y*rval2); location = [ xloc, yloc ];