%% Diffraction Example
%% 1

x = -50:50;
C = fresnelc(x);
S = fresnels(x);
I0 = 1;
T = (C+1/2).^2 + (S+1/2).^2;
I = (I0/2)*T;
plot(x,I)
xlabel('x')
ylabel('I(x)')
title('Intensity of Diffracted Wave')

% Copyright 2015 The MathWorks, Inc.