how can i give output of a python file as input to a matlab matrix
1 view (last 30 days)
Show older comments
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.
Answers (1)
See Also
Categories
Find more on Call Python from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!