dataX = [1 2 3 4 5 6];
dataY = [1 0 1 2 5 10];
A = zeros(6,3);
A(:,1) = ones(6,1);         % funkce 1
A(:,2) = dataX;             % funkce x
A(:,3) = dataX.*exp(dataX); % funkce x*exp(x)
c = A \ dataY';
xx = linspace(dataX(1),dataX(end),100);
plot(dataX,dataY,'ko',xx,c(1)+c(2)*xx+c(3)*xx.*exp(xx));











