x = linspace( 0, 1, 100 );
y = x;

[ X, Y ] = meshgrid( x, y );

Z = X.^2/3 + Y.^2/2;

mat2dat ( 0, [], 'TwoD.dat', 'X, Y, Q', X, Y, Z )