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/lserr.m
2015-10-06 09:51:38 +02:00

7 lines
137 B
Matlab

function [err, grad] = lserr(p, x, y, fun)
err = sum(y - fun(p(1), p(2), x)).^2;
if nargout > 1
grad = lserr_gradient(p, x, y);
end