What is the reason while plotting sinc function in mathematical it is cutting at 0 why ? what is the difference
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen

0 Kommentare
Antworten (1)
DGM
am 23 Feb. 2022
Bearbeitet: DGM
am 23 Feb. 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)
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

