function [xnew,ynew,z]=gridtomat(name);
%function [x,y,z]=gridtomat(name);
eval(['!gridtomat ',name])
eval(['load ',name,'.mgd'])
xnew=ones(y)*x';
ynew=y*ones(x');
z=nanize(z,1.701411e38);
z=nanize(z,1.70141e38);

