SEQUENCE_STREAK_DISPLAY
Display a "Streak Plot" of a Sequence


SEQUENCE_STREAK_DISPLAY is an executable MATLAB program which displays a "streak plot" of a numeric sequence.

The idea is very simple. We can think of a sequence Y as the pairs of values (I,Y(I)). We can then plot this sequence in the usual way. To make a "streak plot", however, we now extend a horizontal ray from each plotted point all the way to the right.

Such a plot can be useful for examing the van der Corput sequence, for instance, which "fills in" the unit interval in a regular way. Looking at the streak plot, you can see the gaps between values shrinking as you move to the right.

Another possible use for such plots is for sequences with one, or better yet several, accumulation points. In that case, you will see the streak lines clustering together as you proceed.

Usage:

squence_streak_display ( 'filename', 'direction' )

filename is a quoted string or string variable containing the name of the file with the data;
direction is a quoted character or character variable with the value 'R', 'L', 'U' or 'D' depending on whether the sequence is to be shown horizontally ('R' or 'L') or vertically ('U' or 'D'), with the streak starting ('R' or 'U') or ending ('L' or 'D') at the sequence value.

Related Data and Programs:

COLLATZ is a library of MATLAB routines which generate the Collatz sequence, which can be displayed by SEQUENCE_STREAK_DISPLAY.

NESTED_SEQUENCE_DISPLAY is a MATLAB program which reads a set of sequences, plots them as horizontal lines of data, and connects sequence entries that are equal.

TABLE is the format used for the file containing the sequence, which is read in by the program.

VAN_DER_CORPUT is a library of MATLAB routines which generate the van der Corput sequence, which can be displayed by SEQUENCE_STREAK_DISPLAY.

Source Code:

Examples and Tests:

collatz_27 lists the Collatz sequence starting at 27.

collatz_count lists the number of entries in each Collatz sequence with starting values from 1 to 100.

uniform_01_00100 contains 100 points of a uniform random sequence in 1D.

van_der_corput_2_0_100 contains 100 points of the van der Corput sequence, using base 2.

You can go up one level to the MATLAB source codes.


Last revised on 30 May 2007.