%%%%%%%%%%%%%%%%%%%%%%%% Aufgabe 3 ->function g.m <-%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function erg = g(x);

% Berechnet das Residuum des ueberbestimmten  Systems g(x) = 0:
% g_k(x) = z(t_k; x) - z_k,  k=1, ..., 9
% mit  x := [a_1, a_2, a_3 ]'

t = [   0;   .5;    1;  1.5;    2;    3;    5;    8;   10];
z = [3.85; 2.95; 2.63; 2.33; 2.24; 2.05; 1.82; 1.80; 1.75];

erg = x(1) + x(2)*exp(x(3)*t) - z;
