Filter löschen
Filter löschen

Protein sequence manipulation for adding elements before or after the sequence.

1 Ansicht (letzte 30 Tage)
how do i add zeros to both ends or one end (before or after) of a protein sequence?
Example:
a protein sequence is given as 'ITYTDCTESGQDLCLCEGSDVCGKGNKCILGSNGEENQCVTGEGTPKPQSHNDGDFEEIPEEYLQ'
how do i add zeros at the beginning before the first element of the sequence?

Akzeptierte Antwort

Peng Li
Peng Li am 31 Mär. 2020
The easiest way to add N zeros before it can be done by:
[repmat('0', 1, N) yourProSeq];
  5 Kommentare
Nedz
Nedz am 9 Apr. 2020
Bearbeitet: Nedz am 9 Apr. 2020
What if i want to add zeroes after the squence (on the right end)?
Peng Li
Peng Li am 9 Apr. 2020
You flip the repmat() stuff and mm in above example.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Large Files and Big Data finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by