Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

//Integration of Dirac Delta Function//

clc;clear;clf;

L=5

x=-10000:1:10000

function y=f(x)

if x==0 then

y=L/%pi

else

y=sin(L*x)/(%pi*x)

end

endfunction

x0=-50

x1=50

I=integrate('f','x',x0,x1)

plot(x,f)

disp("Integration of f(x)= ")

disp(I)

RESULT(console):-
Integration of f(x)=

0.9993962
GRAPH:-

You might also like