saving . . . saved
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 14-03-16, 5:32 p.m. RudiLehn

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.

14-03-16, 8:50 p.m. shamika


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

14-03-16, 11:35 p.m. RudiLehn

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


31-03-16, 2:38 p.m. shamika

Login to add comment


Log-in to answer to this question.