Lable dimensions of multidimensional array

Hi !
I have a 4D array of cells. each dimension corresponds to a variable defined in a loop
How can I assign lables to each dimension so that if the user want the data in B{1,2,19,5} index, they can call for example B{ 'range=4' , '4V' , '5A' , '3m' }
Thanks in advance!

답변 (1개)

Matt J
Matt J 2020년 7월 9일
편집: Matt J 2020년 7월 10일

0 개 추천

There is no quick way to enable this, I'm afraid. You would have too write your own customized data object type and provide a subsref method to process the indexing syntax that you want,

댓글 수: 2

Mahla Bakhshi
Mahla Bakhshi 2020년 7월 13일
Thanks for your answer. But I did not uderstand how to customize data objecting for 4D array ?
Matt J
Matt J 2020년 7월 13일
This example may help, if you are determined to write your own class.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

질문:

2020년 7월 9일

댓글:

2020년 7월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by