MATLAB: Something wierd with sinc function MATLABsinsinc while using sinc(x) function there is a difference between sinc(x) and sin(x)/x also when i manually calculate its equal to sinc(1.5)= -0.2 (negative value) sin(1.5)/1.5 = 0.6 (positive value) why? Best Answer Sounds like you're using a pi-normalized sinc >> sin(1.5*pi)/(1.5*pi) ans = -0.2122It's a normalization often used so that the roots of the sinc() will be at the integers. Related SolutionsMATLAB: Plot sin function with sincommand How about just using sinc() if you have the Signal Processing Toolbox.If not x = linspace(-5,5); y = sin(pi*x)./(pi*x); y(x==0) = 1; plot(x,y) MATLAB: Sinc function x = -20:0.0001:20;y = (sin(pi*x))./(pi*x);y(x==0) = 1;% If you don't get: (Warning: Divide by zero.) you missed 0.plot(x,y) Related QuestionProblem with function sincComplex multiplication giving wrong answerHow to plot sinc signalSinc(pi) doesn’t give zeroHow to rewrite sin(x)/x as sinc(x)
Best Answer