What is the reason while plotting sinc function in mathematical it is cutting at 0 why ? what is the difference

7 visualizaciones (últimos 30 días)

Respuestas (1)

DGM
DGM el 23 de Feb. de 2022
Editada: DGM el 23 de Feb. de 2022
What do you mean "plotting ... in mathematical"?
If you're just comparing the MATLAB sinc() function against sin(x)/x or sin(pi*x)/(pi*x), then keep in mind that it's undefined at 0. Given your coarse plot, the presence of any NaNs will leave a big hole.
x = linspace(-10,10,101);
y1 = sinc(x); % this fills f(0) with the limit value
plot(x,y1)
y2 = sin(pi*x)./(pi*x); % this doesn't fill the hole
plot(x,y2)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by