how can i give output of a python file as input to a matlab matrix

1 次查看(过去 30 天)
function [] = lanczos(A, m) this is a function i'm using in matlab.
the parameter 'A' is matrix and i want to give input to A from another text file which is output of a python file and has following content(matrix in python)
[[1 2 2 0 0 0 0 0 0 0 0]
[2 1 0 0 0 0 0 0 2 0 0]
[2 0 1 2 0 0 0 0 0 0 0]
[0 0 2 0 2 2 0 0 0 0 0]
[0 0 0 2 0 0 4 0 0 0 0]
[0 0 0 2 0 0 0 2 0 2 0]
[0 0 0 0 4 0 0 2 0 0 0]
[0 0 0 0 0 2 2 0 2 0 0]
[0 2 0 0 0 0 0 2 0 0 2]
[0 0 0 0 0 2 0 0 0 0 4]
[0 0 0 0 0 0 0 0 2 4 0]]
but matrix representation in matlab is different from the content of this file ,so is there a way can i pass this file as input to matrix A in matlab function.

回答(1 个)

Stephan
Stephan 2019-10-21

类别

Help CenterFile Exchange 中查找有关 Call Python from MATLAB 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by