0

plot sin(x)/x

##### Title

##### Question

Hi friends,

I would like plot the function sin(x)/x. Of course for x=0 you get in the denominator a problem, but sin(x)/x get 1 for x=0. How can we manage this problem?

Thanks for help.

Rudi

Scilab

__Answers:__

0

I'm not able to understand the issue. When I try to calculate/plot sin(x)/x for x=0, I get an error. Could you share your code? I don't see how you get 1 for x=0.

0

Hi,

the problem is:

Mathematically sin(x)/x approximates to 1 if x comes more and more nearer to 0. Just have a look in Google for sin(x)/x. You will get immediately the graphic of this function.

Rudi

You're right. It does go to 1. The thing is Scilab checks for certain pre defined errors before executing the code.

https://help.scilab.org/docs/5.5.2/en_US/error_table.html

You could use errcatch with the action option to continue execution of your code.

https://help.scilab.org/docs/5.5.2/en_US/errcatch.html

Login to add comment

Login to add comment