help I have 40 iteration , 10 iteration of 40 at random to do something and the other 30 iteration for do another thing??
이전 댓글 표시
help I have 40 iteration , 10 iteration of 40 at random to do something and the other 30 iteration for do another thing?? for t=1:40 take 10 of 40 at random to do something and other 30 for do another thing
채택된 답변
추가 답변 (1개)
Marcel
2015년 1월 19일
Don't quite understand the question. Can't you just create 2 loops?
For i=1:30
<stuff happens>
end
For i=31:40
<other stuff happens>
end
댓글 수: 2
maha ismail
2015년 1월 19일
Stephen23
2015년 1월 19일
@ Marcel: you should avoid using i or j as the loop variables, as these are the names of the inbuilt imaginary unit .
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!