Answer:
function [c err r] = regressor(t, v, degree)
mx = v ;
my = t ;
c = fliplr((pinv(mx' * mx) * mx' * my)');
r = corrcoef(v,t)
V1 = arrayfun(@(x)(polyval(R,x)), W);
error = my - V1
err = norm(error)
end
Step-by-step explanation:
4.5m questions
5.9m answers