无法绘制简单函数
Simple function cant be plotted
enter image description here
第一次接触,经验不足。非常感谢您的帮助。
问题是第二行缺少括号。是
plt.plot(x, 3+math.exp-x*math.sin(6*x))
虽然它可能应该是
plt.plot(x, 3+math.exp(-x)*math.sin(6*x))
当您尝试从 math.exp
(builtin_function_or_method)
中减去 x
(整数)时,该错误可能会帮助您解决这个问题
enter image description here
第一次接触,经验不足。非常感谢您的帮助。
问题是第二行缺少括号。是
plt.plot(x, 3+math.exp-x*math.sin(6*x))
虽然它可能应该是
plt.plot(x, 3+math.exp(-x)*math.sin(6*x))
当您尝试从 math.exp
(builtin_function_or_method)
x
(整数)时,该错误可能会帮助您解决这个问题