function [a_til, b_til] = gera_reta( xr )

if nargin==0
    xr = 0;
end

N = 15;
a0 = 1;
b0 = 2;
x = (1:N);
Y0 = a0 + b0 * x;
s = 1;
Y = Y0 + s*randn( size(Y0) );
P = polyfit( (x-xr), Y, 1 );

a_til = P(1);
b_til = P(2);
