This repository has been archived on 2021-05-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
scientificComputing/statistics-fabian/matlab/lserr.m
2015-10-15 18:18:56 +02:00

6 lines
167 B
Matlab

function [err, grad] = lserr(x, y, param)
err = mean( (param(1)*x + param(2) - y).^2 );
if nargout == 2
grad = lserr_gradient(param, x,y);
end