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 で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!