You can't have spaces in variable names, or two input arguments to a function without a comma between them, so lin_interpol(x pt,y pt) really needs to be lin_interpol(xpt, ypt) or lin_interpol(x, ypt, y, ypt) depending on if you're passing in 2 or 4 arguments.
And when you say interp1(x pt,y pt,xx) is that 3 arguments, or 5? If you're going to have a variable number of arguments (which complicates things) you're going to have to do
function interp1(varargin)
and then look at nargin and extract out the correct things depending on how many arguments nargin tells you are there.
Is pt or xpt a scalar? Or another vector? If it's another vector, then I presume you have an x vector to compare xpt against? If xpt is a scalar, then you still need an x vector that you can plot, unless you're going to assume some range and create one.
See my attached polyfit demo.
