Message Boards Message Boards

0
|
5306 Views
|
2 Replies
|
5 Total Likes
View groups...
Share
Share this post:

[?]Define sinc[x_]:=Piecewise[{{Sin[Pi x]/(Pi x), {x != 0}},{1, {x == 0}}}]

Posted 7 years ago

Hello everyone. I tried to define the following function:

sinc[x_]:=Piecewise[{{Sin[Pi x]/(Pi x), {x != 0}}, {1, {x == 0}}}]

but, when I plot it, the figure is empty. Why and how can I fix this problem?

Plot[sinc[x], {x, -5, 5}]

Thank you for your time.

POSTED BY: Gennaro Arguzzi
2 Replies

btw: sinc is also in the wolfram language as Sinc

POSTED BY: Sander Huisman
sinc[x_] := Piecewise[{{Sin[Pi x]/(Pi x), x != 0}, {1, x == 0}}]
Plot[sinc[x], {x, -5, 5}, PlotRange -> All]

enter image description here

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract