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

1 回表示 (過去 30 日間)
Nitish Reddy Kotkur
Nitish Reddy Kotkur 2019 年 10 月 11 日
回答済み: Stephan 2019 年 10 月 21 日
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 Center および File ExchangeCall Python from MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by