新手python程序总是出错,求帮忙!
下面是我的程序fromnumpyimportarangeimportnumpyasnpdefIFEquation(V,t):return(EL-V+Rm*Ie)/rmrm...
下面是我的程序
from numpy import arange
import numpy as np
def IFEquation( V, t ) :
return ( EL - V + Rm*Ie ) / rm
rm = 10*10**-3
EL = -70
Vr = -70
Vt = -40
Rm = 10
Ie = 3.1
step = 1*10**-3
V = [Vr]
time = arange(0,1.001,step)
t = 0
while t <= 1:
t = t+step
V.append( V[-1] + step * IFEquation( V[-1], t ) )
if V[-1] > Vt :
V[-1] = Vr
总是提示 V.append( V[-1] + step * IFEquation( V[-1], t ) ) 这句最后一个括号有错误
IndentationError: unindent does not match any outer indentation level
新手刚学没多久,不是很了解,求大神帮帮忙!谢谢 展开
from numpy import arange
import numpy as np
def IFEquation( V, t ) :
return ( EL - V + Rm*Ie ) / rm
rm = 10*10**-3
EL = -70
Vr = -70
Vt = -40
Rm = 10
Ie = 3.1
step = 1*10**-3
V = [Vr]
time = arange(0,1.001,step)
t = 0
while t <= 1:
t = t+step
V.append( V[-1] + step * IFEquation( V[-1], t ) )
if V[-1] > Vt :
V[-1] = Vr
总是提示 V.append( V[-1] + step * IFEquation( V[-1], t ) ) 这句最后一个括号有错误
IndentationError: unindent does not match any outer indentation level
新手刚学没多久,不是很了解,求大神帮帮忙!谢谢 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询