Matlab

Neil Caithness 030zncp at witsvma.wits.ac.za
Wed Sep 8 20:41:06 EST 1993


I would like to correspond with researchers in biology using Matlab
(Matrix laboratory and visulization system from the MathWorks)

I've started implementing the more straight forward parts of
multivariate analysis for my own use (eg. principal components,
but I don't want to go about reinventing wheels).

I am most interested in phylogenetic inference, and spatial analysis
of distributions in biogeography, but also spatial interpolation
(eg. kriging etc). I posted to info at mathworks... but this just got
forwarded to the local marketing agent.

I find the system very impressive.
A principal component decomposition is easily done:

  % given a matrix {A} with row observartions and column variables. eg.
    a=rand(100,5)  % gives 100 rows and 5 columns of random numbers.

  % get the size of a
    {n,p}=size(a);      % sorry {} are SQUARE brackets
    e=ones(n,1);        % column of ones for outer product

  % Standardize to zero mean and unit variance
    s=(a-e*mean(a))./(e*std(a));

  % Covariance matrix
    c=cov(s);

  % Eigenvectors and eigenvalues
    {v,d}=eig(c);

  % Principal component scores
    z=s*v;

All thats left is a bit of sorting and reordering.

If you send e-mail direct to me I'll compile a list of
responses and post them later.

In case it's lost in the header, I'm  030zncp at witsvma.wits.ac.za
Regards, Neil Caithness.



More information about the Comp-bio mailing list