Documentation 
Predict minimum freeenergy secondary structure of RNA sequence
rnafold(Seq)
RNAbracket = rnafold(Seq)
[RNAbracket, Energy] =
rnafold(Seq)
[RNAbracket, Energy, RNAmatrix]
= rnafold(Seq)
... = rnafold(Seq,
...'MinLoopSize', MinLoopSizeValue, ...)
... = rnafold(Seq,
...'NoGU', NoGUValue, ...)
... = rnafold(Seq,
...'Progress', ProgressValue, ...)
Seq  Either of the following:

MinLoopSizeValue  Integer specifying the minimum size of the loops (in bases) to be considered when computing the free energy. Default is 3. 
NoGUValue  Controls whether GU or UG pairs are forbidden to form. Choices are true or false (default). 
ProgressValue  Controls the display of a progress bar during the computation of the minimum freeenergy secondary structure. Choices are true or false (default). 
RNAbracket  String of dots and brackets indicating the bracket notation for the minimumfree energy secondary structure of an RNA sequence. In the bracket notation, each dot represents an unpaired base, while a pair of equally nested, opening and closing brackets represents a base pair. 
Energy  Value specifying the energy (in kcal/mol) of the minimum freeenergy secondary structure of an RNA sequence. 
RNAmatrix  Connectivity matrix representing the minimum freeenergy secondary structure of an RNA sequence. A binary, uppertriangular matrix where RNAmatrix(i, j) = 1 if and only if the ith residue in the RNA sequence Seq is paired with the jth residue of Seq. 
rnafold(Seq) predicts and displays the secondary structure (in bracket notation) associated with the minimum free energy for the RNA sequence, Seq, using the thermodynamic nearestneighbor approach.
Note: For long sequences, this prediction can be time consuming. For example, a 600nucleotide sequence can take several minutes, and sequences greater than 1000 nucleotides can take over 1 hour, depending on your system. 
RNAbracket = rnafold(Seq) predicts and returns the secondary structure associated with the minimum free energy for the RNA sequence, Seq, using the thermodynamic nearestneighbor approach. The returned structure, RNAbracket, is in bracket notation, that is a vector of dots and brackets, where each dot represents an unpaired base, while a pair of equally nested, opening and closing brackets represents a base pair.
[RNAbracket, Energy] = rnafold(Seq) also returns Energy, the energy value (in kcal/mol) of the minimum freeenergy secondary structure of the RNA sequence.
[RNAbracket, Energy, RNAmatrix] = rnafold(Seq) also returns RNAmatrix, a connectivity matrix representing the secondary structure associated with the minimum free energy. RNAmatrix is an upper triangular matrix where RNAmatrix(i, j) = 1 if and only if the ith residue in the RNA sequence Seq is paired with the jth residue of Seq.
... = rnafold(Seq, ...'PropertyName', PropertyValue, ...) calls rnafold 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:
... = rnafold(Seq,
...'MinLoopSize', MinLoopSizeValue, ...) specifies
the minimum size of the loops (in bases) to be considered when computing
the free energy. Default is 3.
... = rnafold(Seq, ...'NoGU', NoGUValue, ...) controls whether GU or UG pairs are forbidden to form. Choices are true or false (default).
... = rnafold(Seq, ...'Progress', ProgressValue, ...) controls the display of a progress bar during the computation of the minimum freeenergy secondary structure. Choices are true or false (default).
Determine the minimum freeenergy secondary structure (in both bracket and matrix notation) and the energy value of the following RNA sequence:
seq = 'ACCCCCUCCUUCCUUGGAUCAAGGGGCUCAA';
[bracket, energy, matrix] = rnafold(seq);bracket
bracket =
..(((((...((....))...))))).....
[1] Wuchty, S., Fontana, W., Hofacker, I., and Schuster, P. (1999). Complete suboptimal folding of RNA and the stability of secondary structures. Biopolymers 49, 145–165.
[2] Matthews, D., Sabina, J., Zuker, M., and Turner, D. (1999). Expanded sequence dependence of thermodynamic parameters improves prediction of RNA secondary structure. J. Mol. Biol. 288, 911–940.