Matrix

One of the types of objects in Praat. A Matrix object represents a function z (x, y) on the domain [xmin, xmax] × [ymin, ymax]. The domain has been sampled in the x and y directions with constant sampling intervals (dx and dy) along each direction. The samples are thus z [iy] [ix], ix = 1 ... nx, iy = 1 ... ny. The samples represent the function values z (x1 + (ix - 1) dx, y1 + (iy - 1) dy).

### Matrix commands

Creation:

Create Matrix...
Create simple Matrix...
Read Matrix from raw text file...
Read Matrix from LVS AP file...

Drawing:

Matrix: Draw rows...
Matrix: Draw contours...
Matrix: Paint contours...
Matrix: Paint cells...
Matrix: Scatter plot...
Matrix: Draw as squares...
Matrix: Draw value distribution...
Matrix: Paint surface...

Modification:

Matrix: Formula...
Matrix: Scale...

### Inside a Matrix object

With Inspect, you will see the following attributes.

xmin, xmaxxmin
x domain.
nx ≥ 1
number of columns.
dx > 0.0
distance between columns.
x1
x value associated with first column.
ymin, ymaxymin
y domain.
ny ≥ 1
number of rows.
dy > 0.0
distance between rows.
y1
y value associated with first row.
z [1..ny] [1..nx]
The sample values.

After creation of the Matrix, xmin, xmax, ymin, ymax, nx, ny, dx, dy, x1, and y1 do not usually change. The contents of z do.

Normally, you will want xminx1 and xmaxx1 + (nx - 1) dx.

### Example: simple matrix

If a simple matrix has x equal to column number and y equal to row number, it has the following attributes:

xmin = 1; xmax = nx; dx = 1; x1 = 1;
ymin = 1; ymax = ny; dy = 1; y1 = 1;

### Example: sampled signal

If the matrix represents a sampled signal of 1 second duration with a sampling frequency of 10 kHz, it has the following attributes:

xmin = 0.0; xmax = 1.0; nx = 10000 ; dx = 1.0·10-4; x1 = 0.5·10-4;
ymin = 1; ymax = 1; ny = 1; dy = 1; y1 = 1;

### Example: complex signal

If the matrix represents a complex spectrum derived with an FFT from the sound of example 2, it has the following attributes:

xmin = 0.0; xmax = 5000.0; nx = 8193 ; dx = 5000.0 / 8192; x1 = 0.0;
ny = 2 (real and imaginary part);
ymin = 1 (first row, real part);
ymax = 2 (second row, imaginary part);
dy = 1; y1 = 1; (so that y is equal to row number)