close all; clc; clear; % Problem EPage 82 % gauss_approx = fgauss( @ (x) ( exp(x) ./ sqrt( 1 - x.^2 ) ), -1, +1, 16 ); [chebyshev_approx,dummy] = gacheb( @ (x) ( exp(x) ), 10 ); disp( sprintf('Pt i : gauss approximation= %10.6f, chebyshev approximation= %10.6f', gauss_approx, chebyshev_approx) ); gauss_approx = fgauss( @ (x) ( exp(x) .* sqrt( 1 - x.^2 ) ), -1, +1, 16 ); [dummy,chebyshev_approx] = gacheb( @ (x) ( exp(x) ), 10 ); disp( sprintf('Pt ii: gauss approximation= %10.6f, chebyshev approximation= %10.6f', gauss_approx, chebyshev_approx) );