如何在 GEKKO 中使用复合共轭物

问题描述 投票:0回答:1

我遇到了 GEKKO 的最优控制问题。我需要取变量的复共轭。我知道GEKKO有关于.exp .log等等的方法,但是我没有找到关于.conj的方法

那么我该如何使用 conj.在 GEKKO 中,变量可以是复杂的吗?

python controls gekko optimal
1个回答
0
投票

我对 GEKKO 一无所知。在Python中,您可以使用.conjugate()方法来获取数字的复共轭。

>>> x = 2 + 3j
>>> x.conjugate()
(2-3j)
>>> y = complex(10, 5)
>>> y.conjugate()
(10-5j)
© www.soinside.com 2019 - 2024. All rights reserved.