There is no '=onmatrix()' command, under DB Classic if you tested an x,z position that was outside of the area of the matrix you'd get a 0 back but under DBPro you get back the height of the nearest point of the matrix (actually it doesn't work quite that way but it's easiest way of explaining it).
Your best bet is to know the area your matrix is in, something like
position matrix 1,0,0,0
position matrix 2,300,0,0
position matrix 3,600,0,0
if xPosition<300 then matrix=1
if xPosition=>300 and xPosition<600 then matrix=2
Yeah it's not very well written example, but i'm trying to keep it clear to be understood what I meen

In real terms i'd probably change the second bit to be...
matrix=(xPosition/300)+1
Pneumatic Dryll, Outrageous epic cleric of EQ/Xev
God made the world in 7 days, but we're still waiting for the patch.