I want to break my sample like this. Problem with my logic. need help
이전 댓글 표시
suppose my sample is GAATGCT. i take a size say 4. my output will be like this GAAT,AATG,ATGC,TGCT. when it reach the last position it will stop. it tried for loop but instead of getting this kind of output it gives me single char. i think there is a problem with my logic. can anyone help me. subsample='GAATGCT'; for n=subsample(1:(end-4+1)) for i=subsample(1:4) display(i) end end
댓글 수: 3
Joseph Cheng
2015년 3월 4일
for easier reading,
subsample='GAATGCT';
for n=subsample(1:end)
for i=subsample(1:4)
display(i)
end
end
Tonmoy saha
2015년 3월 4일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 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!