How to solve the urgent problem that two vectors are different in matlab polyfit function fitting

First of all, you import the above data into a txt document and name it loa (just to adapt to my following programming).

data = load(' loa . txt '); % read data

X = data (:,1)'; % assigns the first column to x and turns it into a row vector.

Y = data (:,2)'; % assigns the second column to y and turns it into a row vector.

Plot(x, y,' *')% drawing

Keep? exist

b=polyfit(x,y,6); % for six times, you will find that your fitting image is irregular, so the fitting times can be larger, depending on your own meaning, and b is the value before polynomial. Just like the values of y = ax+b, a and b in quadratic fitting.

yy=polyval(b,x); % to get the new value of y after fitting.

Plot(x, yy)% draw fitting diagram.