generate a combination
조회 수: 5 (최근 30일)
이전 댓글 표시
there are 4026 datas i want to take 2data from top 100 to genarate FCI,can u tell how to process please
댓글 수: 2
the cyclist
2011년 10월 31일
Please edit your question to provide much more detail about what you want. It is not possible to understand what you mean. For example:
How are your 4026 data stored?
What do you mean by "top 100"?
How do you want to choose the 2 data from the 100? Should it be random?
Etc.
Remember we know NOTHING about your problem except what you tell us here.
채택된 답변
Andrei Bobrov
2011년 10월 31일
data = 1:4026;
out = sort(data([1:100:end,2:100:end]));
or
out = data([1:100:end;2:100:end])'
or
out = bsxfun(@plus,sort([randi(100,floor(4026/100),2);randi(26,1,2)],2),(0:100:4000)');
댓글 수: 2
Daniel Shub
2011년 10월 31일
That is a different interpretation to mine. I wonder if either of us are even close.
추가 답변 (1개)
Daniel Shub
2011년 10월 31일
You are still not giving us much to go on ...
randi(100, 2, 1)
will give you two random number between 1 and 100.
doc randi
will tell you how the randi function works.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!