I want to generate a .grd file using wlgrid.m. batimetria.xyz is a file containing a matrix (x,y,z). This is my Matlab code:
load('batimetria.xyz');
batimetry = sortrows(batimetria,1);
data = batimetry(138:end,:);
x = data(:,1);
y = data(:,2);
z = data(:,3);
xmin = min(x);
xmax = max(x);
ymin = min(y);
ymax = max(y);
dx = (xmax - xmin)/100;
dy = (ymax - ymin)/100;
X = xmin:dx:xmax;
Y = ymin:dy:ymax;
[XI,YI]= meshgrid(X,Y);
ZI = griddata(x,y,-z,XI,YI);
ZI(isnan(ZI)) = 0;
contourf(XI,YI,ZI,30);
wldep('write', 'bat.dep' , ZI);
wlgrid('write','grid.grd',XI,YI);
The error displayed is: Undefined function 'ustrcmpi' for input arguments of type 'cell'.
Error in wlgrid>Local_write_grid (line 412) j = ustrcmpi(varargin{i},Cmds);
Error in wlgrid (line 82) Out=Local_write_grid('newrgf',varargin{:});
Any advice? Thank you.