Plot Problem

1 次查看(过去 30 天)
Rick
Rick 2011-9-28
These commands create the expected plot:
x=.1:.1:4*pi;
y=sin(pi*x)/pi;
plot(x,y)
However, the following commands create a horizontal line at zero:
x=.1:.1:4*pi;
y=(sin(pi*x))/(pi*x);
plot(x,y)
(I don't have a sinc function.) I don't understand why the second set of commands doesn't work. Thoughts?

采纳的回答

Walter Roberson
Walter Roberson 2011-9-28
You are using mrdivide when you want to use rdivide
  1 个评论
Rick
Rick 2011-9-28
y=(sin(pi*x))./(pi*x); gives expected plot. Thanks.

请先登录,再进行评论。

更多回答(1 个)

Raviteja
Raviteja 2011-9-28
x=.1:.1:4*pi;
y=(sin(pi*x))./(pi*x);
plot(x,y)
Is this working?

类别

Help CenterFile Exchange 中查找有关 Waveform Design and Signal Synthesis 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by