필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How many way I can peak up from an array

조회 수: 3 (최근 30일)
joy
joy 2015년 4월 14일
마감: MATLAB Answer Bot 2021년 8월 20일
This is equivalent to star bar problem. I want to implement it in matlab.
I have an array A which has [1 1 1 1......1] 20 elements I have an array B which has [2 2 2 2......2] 20 elements I have an array C which has [3 3 3 3......3] 20 elements
Now I want to find in how many ways I can select 3 to 9 elements from all these array..
like i can take 3 from A or 3 from B or 3 from C or it can be 1 from A and 2 from B...like this...so on......
abc=[A B C];
allcombs = nchoosek(abc, 9);
combs = unique(allcombs, 'rows');
I don't think its a correct approach...It will computationally tough.

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by