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

조회 수: 7 (최근 30일)

답변 (1개)

DGM
DGM 2022년 2월 23일
편집: DGM 2022년 2월 23일
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)

카테고리

Help CenterFile Exchange에서 Direction of Arrival Estimation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by