Converting irregular nested python list to matlab array
Ältere Kommentare anzeigen
I am trying to convert an irregular python list ( by irregular I mean size of elements within each sub-list may not be same) to matlab array. The structure of the list is as follows :-
%Python list
nested_list = [
[
[[1,1], [2,2]],
[[3,3], [4,4], [5,5]]]
],
[
[[1,1], [2,2]],
[[3,3], [4,4], [5,5]]],
[[6,6]]
]
]
As you can see the array is 4D and size of each sub list is not constant. I don't wish to use scipy.io.savemat function. I have tried matlab's cell function but coudn't find a way to call it recursively. Is there a way to convert this list to a matlab array/cell array?
Thank You.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Call Python from MATLAB finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!