After using nchoosek function, how can i create variables for each answer?
조회 수: 1 (최근 30일)
이전 댓글 표시
Title says it all mostly. I created a matrix of 15x4 as a result of nchoosek (that gave me 15 answers) and i would like to be able to make 15 new variables; one for each answer (combination). Thank you in advance
댓글 수: 0
채택된 답변
Sean de Wolski
2013년 5월 24일
댓글 수: 5
Sean de Wolski
2013년 5월 28일
So index into it. To get the fourth row:
X(4,:)
This is much easier and much better than creating X4.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!