plot sinc function

Hi,
I want to know how to plot a (smooth) sinc on matlab.
Thanks

回答 (2 件)

Matt Fig
Matt Fig 2011 年 4 月 30 日

2 投票

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 件のコメント

medhat
medhat 2011 年 4 月 30 日
My problem is in the smoothness of the plot. I want a smooth sinc such that I can extract the figure and put it in a file to be printed.
The previous code does not give me a smooth one even if I decreased the step
dm
dm 2011 年 4 月 30 日
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 2011 年 4 月 30 日
Thank you very much, that is what I want. The problem appears when printing the figure.
Thanks

サインインしてコメントする。

badour ashkar
badour ashkar 2019 年 11 月 26 日

0 投票

plot(x,sinc(x))

2 件のコメント

Andile Simelane
Andile Simelane 2020 年 5 月 12 日
It doesn't work. always gives "undefined Function sinc for input arguments of type double"
Walter Roberson
Walter Roberson 2020 年 5 月 12 日
sinc() is part of the Signal Processing Toolbox

サインインしてコメントする。

製品

質問済み:

2011 年 4 月 30 日

コメント済み:

2020 年 5 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by