[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

2D cluster of 2D matrix in Octave?

From: Mark Wall
Subject: 2D cluster of 2D matrix in Octave?
Date: Thu, 18 Apr 2002 18:48:22 -0500


I would love to use Octave for the following 2 tasks, but am unable to determine if Octave will work. My primary question- is this possible in Octave? Secondary- if yes, how?

We routinely use MatLab with the Statistics Tool Box to manipulate and plot a 2 dimensional matrix (m x n) of real numbers. If you think of each dimension as an array of vectors (e.g. a collection of m vectors (each n-dimensions), we 1) cluster these (and generate a dendrogram) for both dimensions as below using a city-block distance measure:

original matrix with labels
   W X Y Z
A  0 1 0 0
B  0 1 0 1
C  5 0 0 0
D  0 0 0 2
E  5 0 0 0

Clustered matrix
   W Y X Z
E  5 0 0 0
C  5 0 0 0
A  0 0 1 0
B  0 0 1 1
D  0 0 0 2

In reality, m and n are between 50 and 1000 so we 2) display these matrices as an x-y-color plot for easy visualization. Think of this as a square frame with each pixel representing a matrix element. The values are represented by a color continuum (dark blue = low values, through yellow to red = high values). I can provide a JPEG if necessary.

With large matrices, we isolate sub-clusters by creating new matrices that are the appropriate slices of the original matrix and then repeat steps 1 and 2 on the sub-matrices.

Thank you,

Mark Wall
HHMI/UT Southwestern Medical Center
5323 Harry Hines Blvd.
Dallas, Texas  75390-9050

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]