Converting irregular nested python list to matlab array
显示 更早的评论
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.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Call Python from MATLAB 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!