3d plotting of a matrix



How can I perform ``plot3d()'' of a matrix?
I need to get the plot of a 3d-grid (surface) defined by a matrix in which
elements represent Z-coordinates for 3d-grid nodes.
I tried the way described below:

M:MATRIX([1,2,3,4],[1,2,3,4],[1,2,3,4],[1,2,3,4])$
plot3d(M[x][y],[x,1,4],[y,1,4],['grid,4,4]);

But I got the error message from the Maxima in which it said that the ``x''
and ``y'' in the ``M[x][y]'' expression must be integers. That's right, but I
can not find a function that converts float numbers to integer ones.
I also tried to fool the Maxima by typing something like this:

plot3d(M[?truncate(x)][?truncate(y)],...);

but got the error message about my ``x'' and ``y'' are not floats (but what
they are if they aren't integers too?). The straightforward way to fix this:

plot3d(M[?truncate(FLOAT(x))][?truncate(FLOAT(y))],...);

produces the same error message :(

Any solution out there?
Thanks a lot for any help...

P.S.
I think my problem is enough foolish, but I'm C/C++/asm programmer and these
implicit dynamical type convertion tricks produce the cold sweat on my
forehead ;)
-- 
Konstantin Khomoutov from DResearch (Digital Media Systems GmbH).
mailto: k.homutov@DResearch.de, khomoutov@mail.ru
   ICQ: 102278638