![]() |
||||||
|
| Script S5_1_1.m | |||
|
|||
|
%==============================================
%5.1.1 Introduction %============================================== % %distance d in mm d=0.02; % d=0.05; % d=0.01; % d=0.07; % d=0.04; %lambda in mm lambda=0.5e-03; %value of k k=2*pi/lambda; %interval of teta between 3° and -3° divided into NN parts NN=101 tetag=linspace(-3,3,NN); teta=tetag*pi/180; %parameter t t=k*sin(teta); %alfa is the argument of sin(alfa)/alfa %if alfa is equal to zero %it is replaced by eps alfa=0.5*d*t+(0.5*d*t==0)*eps; %the function sinc(alfa) sinc=sin(alfa)./alfa; plot(t,sinc,'ro-'),grid on,axis([-600 600 -0.3 1]), title(' Function sinc varying t') figure %the square of sinc(alfa) called sincq sincq=sinc.^2; %its plot plot(t,sincq,'bd-'),grid on axis([-600 600 0 1]), title('Function sincq varying t') %============================================== % |
|||
| Top | |||