Using python in matlab - substitute for []
조회 수: 4 (최근 30일)
이전 댓글 표시
So I'm trying to call a python object that is indexed with square brackets []. I can't use the underlying function (__getitem__()). So How do I make this call: worksheet.row_dimensions[1] ? (Python code)
댓글 수: 0
답변 (1개)
Matthew Esch
2018년 7월 30일
I understand you are using Python from MATLAB and are having issue indexing into a Python Object.
Is this object you are trying to index a custom created Python class/container or a builtin Python container such as "list"?
If you are trying to index into a Python built-in structure, please see the following documentation: https://www.mathworks.com/help/matlab/matlab_external/accessing-elements-in-python-container-types.html
If you are trying to index into a Python Object that does not inherit from collections.Sequence or collections.Mapping, this is currently a limitation with MATLAB. More information about unsupported Python indexing can be found at: https://www.mathworks.com/help/matlab/matlab_external/limitations-to-indexing-into-python-objects.html?s_tid=answers_rc2-3_p6_MLT
댓글 수: 0
참고 항목
카테고리
Help Center 및 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!