plot sinc function

4 visualizzazioni (ultimi 30 giorni)
medhat
medhat il 30 Apr 2011
Commentato: Walter Roberson il 12 Mag 2020
Hi,
I want to know how to plot a (smooth) sinc on matlab.
Thanks

Risposte (2)

Matt Fig
Matt Fig il 30 Apr 2011
ezplot(@sinc)
Or, more generally:
x = -5:.01:5;
plot(x,sinc(x))
This is if you have the signal processing toolbox. If not, you will have to define your own SINC function. If that is the case, show what you have done so far on it.
  3 Commenti
dm
dm il 30 Apr 2011
How can a step-size of 0.01 not be good enough for a smooth plot? The difference between 0.01 and 0.0001 is hardly visible here. However, try using linesmooth in the plot command, i.e.
plot(x,sinc(x),'linesmooth','on')
medhat
medhat il 30 Apr 2011
Thank you very much, that is what I want. The problem appears when printing the figure.
Thanks

Accedi per commentare.


badour ashkar
badour ashkar il 26 Nov 2019
plot(x,sinc(x))
  2 Commenti
Andile Simelane
Andile Simelane il 12 Mag 2020
It doesn't work. always gives "undefined Function sinc for input arguments of type double"
Walter Roberson
Walter Roberson il 12 Mag 2020
sinc() is part of the Signal Processing Toolbox

Accedi per commentare.

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by