saving . . . saved error while plotting plot(sin(x)*sin(x))/x has been deleted. error while plotting plot(sin(x)*sin(x))/x has been hidden .
error while plotting plot(sin(x)*sin(x))/x
Title
Question
x = linspace(1,100, 50)
plot(sin(x)*sin(x))/x

when i tried to plot this it shows a graph but comes in with a no of error
like
TypeError: unsupported operand type(s) for /: 'Line2D' and 'float'

how to solve this issue

Python-3.4.3 Using-plot-command-interactively 06-07 min 10-20 sec 22-04-20, 10:28 a.m. varuntk

Answers:

Please use the command as follows: plot( ( sin( x ) * sin( x ) ) / x ) 

Please ensure that the brackets are used in the correct order, since plot is a function it needs its own set of brackets too
22-04-20, 11:15 a.m. ankitrj.iitb


Log-in to answer to this question.