# MATLAB: Problem with code. Error using vertcat

matricesvertcat

Hello, I am having difficulty with a code. Every time I run it, it tells me that I have an error using vertcat. I'm not quite sure how to fix this. Any help is greatly appreciated. The code is provided below:
function a = QuadFit( x,y )colx=size(x);coly=size(y);m=colx;n=coly;if m~=n    error('Size of x and y must be equal');end%x values summationsumx=0;for i=1:m    sumx=sumx+x(i);end%x^2 values summationsumx_2=0;for i=1:m    sumx_2=sumx_2+(x(i)^2);end%x^3 values summationsumx_3=0;for i=1:m    sumx_3=sumx_3+(x(i)^3);end%x^4 values summationsumx_4=0;for i=1:m;    sumx_4=sumx_4+(x(i)^4);end%y values summationsumy=0;for i=1:m    sumy=sumy+y(i);end%x*y values summationsumxy=0;for i=1:m    sumxy=sumxy+(x(i)*y(i));end%(x^2)*y values summationsumx_2y=0;for i=1:m    sumx_2y=sumx_2y+((x(i)^2)*y(i));enda=[sumx_2 sumx_3 sumx_4 sumx_2y;sumx sumx_2 sumx_3 sumxy;n sumx sumx_2 sumy];a=rref(a);a1=a(1,4);a2=a(2,4);a3=a(3,4);end
The error is occurring is this line:
a=[sumx_2 sumx_3 sumx_4 sumx_2y;sumx sumx_2 sumx_3 sumxy;n sumx sumx_2 sumy];

colx=size(x,2);coly=size(y,2);