saving . . . saved Plot (sin(x)*sin(x)) /x. has been deleted. Plot (sin(x)*sin(x)) /x. has been hidden .
Plot (sin(x)*sin(x)) /x.
Hi , in this question we have only one parameter. By using one parameter how can we plot the given statement. and the '/x' is after the plot argument statement. so how will it works? can you explain

Python-3.4.3 Using-plot-command-interactively 07-08 min 50-60 sec 25-05-19, 12:16 p.m. esthervs


The given statement is the function that is supposed to be plotted, y = f(x) so the equation provided is itself the y parameter.
25-05-19, 12:29 p.m. ankitrj.iitb
But what about /x after the plot comment , I can get answer with plot (sin(x)*sin(\xd7)). But by adding /x throughout type error

25-05-19, 12:42 p.m. esthervs

Login to add comment

Please paste the complete traceback along with the command that you used
25-05-19, 1:18 p.m. ankitrj.iitb
<ipython-input-55-85e7860a2ace> in <module>
----> 1 plot(sin(x)*sin(x))/x

TypeError: unsupported operand type(s) for /: 'Line2D' and 'float'

25-05-19, 3:24 p.m. esthervs
Thank you for responding.

The function should be inside the plot command like so plot(<function>)

Example 1. plot( sin(x) )
Example 2 plot( sin(x)/x )

If you observe your command pasted above, you are closing the plot( ) close bracket and then dividing the command by x like so;

plot( <function> ) / x ----> Gives you error
plot( <function> / x ) -----> will run successfully
25-05-19, 3:59 p.m. ankitrj.iitb

Login to add comment

Log-in to answer to this question.