% Intro. to MATLAB for Engineers and Scientists, D. Etter, Prentice-Hall % p. 80 function s = sin_x(x) % SINC_X This functions computes the values of sin(x)/x % s = x; set1 = find(abs(x)<0.001); set2 = find(abs(x) >= 0.001); s(set1) = ones(size(set1)); s(set2) = sin(x(set2))./x(set2);