[Paraboloid]
x^2/4;
#//Create matrix objects for X and Y
wks.nmats=3;
mdim cols:=51 rows:=51 x1:=0 x2:=10 y1:=0 y2:=2*pi;
msetvalue im:=mat(2) formula:="x*cos(y)";
msetvalue im:=mat(3) formula:="x*sin(y)";

[Sphere]
cos(x);
#//Create matrix objects for X and Y
wks.nmats=3;
mdim cols:=50 rows:=50 x1:=0 x2:=pi y1:=0 y2:=2*pi;
msetvalue im:=mat(2) formula:="sin(x)*cos(y)";
msetvalue im:=mat(3) formula:="sin(x)*sin(y)";

[Mexican Hat]
sin(sqrt(x^2+y^2))/sqrt(x^2+y^2);
#//Set values of XY coordinates for the matrix
mdim cols:=41 rows:=41 x1:=-10 x2:=10 y1:=-10 y2:=10;

[2D Gaussian Surface]
nlf_Gauss2D(x,y,0,1,5,2,5,2)

[Plane]
nlf_Plane(x,y,-1,1,1)


[Normalize the matrix to (0,1)]
(cell(i,j)-dmin)/(dmax-dmin);
#//Calculate descriptive statistics on the matrix
mstats min:=dmin max:=dmax;

[Fill the matrix with uniform random numbers]
rnd()

[Calculation between matrix objects in another MSheet]
ma*mb;
#//Prepare two extra objects in another matrix sheet
newbook mat:=1;
%A=bkname$;
range m1=[%A]1!;
m1.nmats=2;
range ma=[%A]1!mat(1);
range mb=[%A]1!mat(2);
msetvalue im:=ma formula:="sin(x+y)";
msetvalue im:=mb formula:="cos(x+y)";

[Adding two matrix objects]
mat(2)+mat(3);
#//Prepare two extra objects in the matrix sheet
wks.nmats=3;
msetvalue im:=mat(2) formula:="x";
msetvalue im:=mat(3) formula:="y";