- 积分
- 992
- 注册时间
- 2014-12-4
- 最后登录
- 1970-1-1
- 打卡等级:偶尔看看
- 打卡总天数:105
- 打卡总奖励:319
|
楼主 |
发表于 2019-6-17 00:32:36
|
显示全部楼层
我的简单程序非常简单。
你应该能够剪切和粘贴。
了解简单的计算机编程很重要。
My simple program is very simple.
You should be able to cut and paste.
Knowing simple computer programming is important.
import numpy as np # import the numerical library for roots
Kp=0.01 # initialize the proportional gain
ce=[1,2,5,5*Kp] # the coefficients of the characteristic equation
poles = np.roots(ce) # compute the poles or roots
for i in range(poles.size): # print out the poles one at a time.
print("Pole{} = {:.2f}".format(i,complex(poles[i])))
|
|