
function y=f(x)     
    y=sin(2*%pi*x)  
endfunction  
x=linspace(0,5,200);   
titre="sinus";  
            
plotSinus=scf();
fplot2d(x,f)
plotSinus2=scf();
fplot2d(x,f)
 a=[1,2,3;1,2,3]

a=0.0001; // diametre
lambda=0.5e-6; 
k=2*%pi/lambda;
function i=intensite(theta) 
    x = k*a/2*sin(theta)
    i=(2*besselj(1,x)/x)**2
endfunction 
theta = linspace(-0.02,0.02,200);
            
figDiffraction=scf();
fplot2d(theta,intensite,style=5)
 
n=length(theta); 
m=zeros(n,2); 
for p=1:n, m(p,1)=theta(p); m(p,2)=intensite(theta(p)); end;
            
