필터 지우기
필터 지우기

Splitting the characters of string

조회 수: 1 (최근 30일)
Reshma Ravi
Reshma Ravi 2017년 5월 22일
답변: KSSV 2017년 5월 22일
For example I have a string that is, aatcgatcaagtca and I want to split it into four letters each that is,aatc,atcg,tcga,cgat and so on.

답변 (1개)

KSSV
KSSV 2017년 5월 22일
str = 'aatcgatcaagtca' ;
iwant = [str(1:end-3)' str(2:end-2)' str(3:end-1)' str(4:end)'] ;
There could be more elegant way...

카테고리

Help CenterFile Exchange에서 Genomics and Next Generation Sequencing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by