This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.


Format long sequence output for easy viewing


seqdisp(Seq, ...'Row', RowValue, ...)
seqdisp(Seq, ...'Column', ColumnValue, ...)
seqdisp(Seq, ...'ShowNumbers', ShowNumbersValue, ...)



Nucleotide or amino acid sequence represented by any of the following:

  • Character array

  • FASTA file name

  • MATLAB® structure with the field Sequence

Multiply aligned sequences are allowed.

FASTA files can have the file extension fa, fasta, fas, fsa, or fst.

RowValueInteger that specifies the length of each row. Default is 60.
ColumnValueInteger that specifies the column width or number of symbols before displaying a space. Default is 10.
ShowNumbersValueControls the display of numbers at the start of each row. Choices are true (default) to show numbers, or false to hide numbers.


seqdisp(Seq) displays a sequence in rows, with a default row length of 60 and a default column width of 10.

seqdisp(Seq, ...'PropertyName', PropertyValue, ...) calls seqdisp with optional properties that use property name/property value pairs. You can specify one or more properties in any order. Each PropertyName must be enclosed in single quotation marks and is case insensitive. These property name/property value pairs are as follows:

seqdisp(Seq, ...'Row', RowValue, ...) specifies the length of each row for the displayed sequence.

seqdisp(Seq, ...'Column', ColumnValue, ...) specifies the number of letters to display before adding a space. RowValue must be larger than and evenly divisible by ColumnValue.

seqdisp(Seq, ...'ShowNumbers', ShowNumbersValue, ...) controls the display of numbers at the start of each row. Choices are true (default) to show numbers, or false to hide numbers.


Read sequence information from the GenBank® database. Display the sequence in rows with 50 letters, and within a row, separate every 10 letters with a space.

mouseHEXA = getgenbank('AK080777');
seqdisp(mouseHEXA, 'Row', 50, 'Column', 10)

Create and save a FASTA file with two sequences, and then display it.

hdr = ['Sequence A'; 'Sequence B'];
fastawrite('local.fa', hdr, seq);
seqdisp('local.fa', 'ShowNumbers', false')

ans =
>Sequence A
>Sequence B

Introduced before R2006a

Was this topic helpful?