% Test for raw zgridmx mexfile.

%grid:
x = 1:0.1:10;
y = 5:0.2:20;
nxg = length(x);
nyg = length(y);
Zb = zeros(nxg, nyg);
Zb(1:10, 1:15) = NaN;

%Input data:
xp = (1:0.3:10).';
nx = length(xp);
yp = 4:0.5:18;
ny = length(yp);

Xp = xp(:,ones(1,ny));
Yp = yp(ones(nx,1),:);

% x is the row dimension--increases down the column.
Zp = sin(Xp) .* (Yp-8);

ZZ = zgridmx(Zb, Xp, Yp, Zp, x, y, diff(x([1 2])), diff(y([1 2])), 1, 1, 3, 1);
