作自己定义的函数图像,plot行显示name is not defined
X= float(input(" Please enter a number: "))
# tell the program are you an "enthusiast" ?
A1= float(input(" Please enter a number '0' or '1' : "))
def tem_graph(A,B,E):
G = Asin((2*pi/B(t-12))+E)
return (G)
if A1 == 1:
if X == 1:
A=20;
B= 720;
E= -25;
elif X == 2:
A = 21;
B = 744;
E = -25
else:
A = 20;
B = 744;
E = -24;
t = arange(0,B,720)
plot(t,G,linewidth = 3)
show()