Carter - your definitions of x and y are fine, but these are initializations that must occur in the base workspace and not be put in the m file. From your above code, it looks like you pasted the
x = [-81.091,-81.058,-80.818,-80.387,-79.789]'
y = [48,72,96,120,140]'
into the file, and then tried to run it. (Though this might give a different error if you had done this.)
Make sure that the first line in your NewtonCoef.m file is the function signature
function a = NewtonCoef(x, y)
and then do the following - in the Command Window, create the x and y as
>> x = [-81.091,-81.058,-80.818,-80.387,-79.789]'
>> y = [48,72,96,120,140]'
and then call your function with these two input parameters
>> a = NewtonCoef(x,y);
When I run the above, I see that
a =
48 727.27 0 -1.9383 0
Note that you may want to add some semicolons at the end of your assignment lines (in NewtonCoef) to prevent the Command Window from being cluttered with extra information.