Hi,
As per my understanding, you are getting an error while fitting the data in x, y, and z. Note that the x, y, z are the column vectors of the same dimension in the 'fit' function. In your case, you can do the same as follows: -
x = [1:60]'; % column vector
y = [1:60]'; % column vector
X = repmat(x,60,1); % get x for all values of z
Y = repelem(y,60); % get y for all values of z
z = rand(60,60); % replace this z with your 60x60 array
Z = z(:); % make z a column vector
Fit_Background = fit([X,Y],Z,'poly33'); % fit
For more information, check out the documentation link below: -