I have two different class types. Can I use in the map container one as a value and the other as a key?

 채택된 답변

Adam
Adam 2017년 6월 2일

0 개 추천

No. Keys are restricted to:
'Possible values are 'char', 'double', 'single', 'int32', 'uint32', 'int64', or 'uint64'.'
So I guess if your class inherits from one of these then you can (I don't think I have tried this), but not otherwise.

추가 답변 (1개)

Feilin Jia
Feilin Jia 2018년 2월 12일

0 개 추천

No. I have the same question with you. I tried, but it gives me error. The key must be a number or character.

카테고리

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

태그

질문:

2017년 6월 2일

답변:

2018년 2월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by