plot sinc function

조회 수: 4 (최근 30일)
medhat
medhat 2011년 4월 30일
댓글: Walter Roberson 2020년 5월 12일
Hi,
I want to know how to plot a (smooth) sinc on matlab.
Thanks

답변 (2개)

Matt Fig
Matt Fig 2011년 4월 30일
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
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일
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

댓글을 달려면 로그인하십시오.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by