Signal Processing Toolbox Previous page   Next Page

Representing Signals

The central data construct in MATLAB is the numeric array, an ordered collection of real or complex numeric data with two or more dimensions. The basic data objects of signal processing (one-dimensional signals or sequences, multichannel signals, and two-dimensional signals) are all naturally suited to array representation.

Vector Representation

MATLAB represents ordinary one-dimensional sampled data signals, or sequences, as vectors. Vectors are 1-by-n or n-by-1 arrays, where n is the number of samples in the sequence. One way to introduce a sequence into MATLAB is to enter it as a list of elements at the command prompt. The statement

creates a simple five-element real sequence in a row vector. Transposition turns the sequence into a column vector

resulting in

Column orientation is preferable for single channel signals because it extends naturally to the multichannel case. For multichannel data, each column of a matrix represents one channel. Each row of such a matrix then corresponds to a sample point. A three-channel signal that consists of x, 2x, and x/pi is

This results in


Previous page  Key Areas: Filter Design and Spectral Analysis Waveform Generation: Time Vectors and Sinusoids Next page

© 1994-2005 The MathWorks, Inc.