MATLAB Answers

Lable dimensions of multidimensional array

49 views (last 30 days)
Mahla Bakhshi
Mahla Bakhshi on 9 Jul 2020 at 19:24
Commented: Matt J on 13 Jul 2020 at 20:05
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!

  0 Comments

Sign in to comment.

Answers (1)

Matt J
Matt J on 9 Jul 2020 at 23:19
Edited: Matt J on 10 Jul 2020 at 2:38
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 Comments

Mahla Bakhshi
Mahla Bakhshi on 13 Jul 2020 at 19:15
Thanks for your answer. But I did not uderstand how to customize data objecting for 4D array ?

Sign in to comment.