如何在MATLAB中将eig与nobalance选项一起使用? [英] How to use eig with the nobalance option as in MATLAB?
问题描述
在MATLAB中,我可以发出命令:
In MATLAB I can issue the command:
[X,L] = eig(A,'nobalance');
为了计算特征值而没有平衡选项
In order to compute the eigenvalues without the balance option.
NumPy中的等效命令是什么?当我运行eum的NumPy版本时,其结果与打开nobalance的MATLAB结果不同.
What is the equivalent command in NumPy? When I run the NumPy version of eig, it does not produce the same result as the MATLAB result with nobalance turned on.
推荐答案
NumPy当前无法执行此操作.正如霍奇勒所说,一段时间以来,已经有一张开放票.但是,可以使用外部库来实现.在这里,我写下了如何使用与NAG库的Python绑定来做到这一点
NumPy can't currently do this. As horchler said, there has been an open ticket open for this for a while now. It is, however, possible to do it using external libraries. Here I write up how to do it using the Python bindings to the NAG library
http://www.walkingrandomly.com/?p=5303
应该有可能使用与LAPACK的任何接口(例如Intel MKL等)执行类似的操作.
It should be possible to do something similar using any interface to LAPACK such as the Intel MKL etc.
这篇关于如何在MATLAB中将eig与nobalance选项一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!