Hi Team!
Is there a way in Matlab to create a set of sets?
V = [[1 2] [1 3] [1 2 3]];
I tried quite a few methods but the only one that worked is to convert everything to a string and then do a bunch of string manipulations. I would expect that Matlab would have a better way to handle this. Also, the sets can vary in the number of elements.
Thanks for the assist!

 채택된 답변

Geoff Hayes
Geoff Hayes 2020년 5월 5일

0 개 추천

David - try using a cell array:
V = {[1 2] [1 3] [1 2 3]};

댓글 수: 1

David Smalenberger
David Smalenberger 2020년 5월 5일
I knew Matlab had an solution. Thank you!

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

추가 답변 (1개)

Raghul Dhanesh
Raghul Dhanesh 2020년 12월 13일

0 개 추천

V = [[1 2] [1 3] [1 2 3]];

카테고리

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

제품

릴리스

R2017a

태그

질문:

2020년 5월 5일

답변:

2020년 12월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by