Let's assume that your x_coord is n x 7 and that y_beam is n x 1. Then each of x.N2.pi for i = 0:6 is n x 1.
In order to use fit, the surface fitting function, these need to be the same size and all vectors. You can build these vectors with the following:
X = x_coord(:) % this returns the elements of x_coord in column order
Y = repmat(y_beam, 7,1) % this creates a column vector of 7 y_beams stacked on top of one another
Z = [z.N2.p0 ; z.N2.p1 ; z.N2.p2 ; z.N2.p3 ; z.N2.p4 ; z.N2.p5 ; z.N2.p6] % This stacks the z.N2.pi vectors on top of one another
Then you can do the fitting:
f = fit([X,Y],Z,'fittype'); % change this to be the fit type that best matches your problem
plot(f, [X,Y], Z);