MATLAB: Sinc function sinc At y=0, the graph is not plotted. How would I plot it, to compare to the sinc(x) function. Thanks in advanced. x=-20:0.1:20; y=(sin(pi*x))/(pi*x); if x=0 ..... end plot(x,y,); hold on plot (x,sinc(x),'*'); Best Answer 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 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: Plot Problem You are using mrdivide when you want to use rdivide Related QuestionHow to plot sinc signalSomething wierd with sinc functionDesign an x-y plot for the following where the values of x are from 0 to 20π with a spacing of π/100Problem with function sincHow to get MATLAB to plot this function? y = (P/x)*sin(x)+cos(x) where P = 3pi/2Problem in plotting a sinc function
Best Answer