//deff('y=f(X)', 'y=exp(2*X)*cos(3*X)');
//X = [0 0.3 0.6];

//deff('y=f(X)', 'y=sin(log(X))');
//X = [2.0 2.4 2.6];

//deff('y=f(X)', 'y=log(X)');
//X = [1 1.1 1.3 1.4];

//deff('y=f(X)', 'y=cos(X)+sin(X)');
//X = [0 0.25 0.5 1];

//n = size(X,2);
//Y = ones(1,n);

//for i=1:n
//	Y(i) = f(X(i));
//end

//x = [-1 0 1 2 3 4 5];
//y = [1.5 3.36 4.18 -1 -5.93 4.22 -2.59];
//x = [-0.5 1 1.76 2.34 2.6 3.786 4];
//y = [-144.2 -265.44 544.18 356.46 -411.933 -346.22 -533.59];
//X = -1:0.06:5;
//n = size(X,2);
//Y = zeros(1,n);
//A = divdif(x,y);
//for i=1:n
//	Y(i) = intpNewton(x,y,X(i),A);
//end
//plot(x,y,X,Y);

//deff('y=f(x)', 'y=0.649*x+1.399');

//E_2 = 0;
//n = size(x,2);

//for i=1:n
//	E_2 = E_2 + (abs(f(x(i)) - y(i)))^2
//end

//E_2 = (E_2 / n)^0.5;

//deff('y=f(x)', 'y=1.0365513*x+5.0926992');
E_2 = 0;
n = size(x,2);
for i=1:n
	E_2 = E_2 + (abs(f(x(i)) - y(i)))^2
end
E_2 = (E_2 / n)^0.5;