I try to multiply a matrix with a vector to do the least square problem. Even thought my matrix and vector have the same dimention to multiply. MatLab say they don't have the same dimention. The erro happen in the last line

`%create a cater plot`

clear all;%x = [20,30,40,50]

x = [-3,-1,1,2]y=[8,23,28,34]colum = [1,1,1,1]plot(x,y,"O",'MarkerSize', 4);matrixA1 =[]%create a matrix

% first matrix

matrixA1 = [colum(:),x(:)]%create the tranpose matrix

tranposeA = matrixA1.';c = tranposeA*matrixA1% power 1

final_matrix = [c tranposeA*y]

## Best Answer