Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (8 sloc) 183 Bytes
x = [0 1 2 3 4]';
y = [6 12 30 80 140]';
A = [exp(x), ones(size(x))]
lam = A'*A \ A'*y;
plot(x, y, 'o', 'Linewidth', 2)
hold on
xx = linspace(0,4);
plot(xx, lam(1)*exp(xx)+lam(2))
You can’t perform that action at this time.