Home > . > mnf2.m

mnf2

PURPOSE ^

function [psi,phi] = mnf(X)

SYNOPSIS ^

function [phi,psi] = mnf2(X)

DESCRIPTION ^

 function [psi,phi] = mnf(X)
    X - an p x N data matrix  (N is number of samples)

 Out:
    psi - the mixing coefficients (pxp)
   phi - basis  p x N

 Example:
    s = sin(0:99);
    n = [zeros(1,50) rand(1,50)];
    M = [1 0.5; 0.2 0.8];
    X = M * [s;n];
    subplot(2,1,1);
    plot(X');
    subplot(2,1,2);
    [psi,phi] = mnf2(X);
    plot(phi');

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [phi,psi] = mnf2(X)
0002 % function [psi,phi] = mnf(X)
0003 %    X - an p x N data matrix  (N is number of samples)
0004 %
0005 % Out:
0006 %    psi - the mixing coefficients (pxp)
0007 %   phi - basis  p x N
0008 %
0009 % Example:
0010 %    s = sin(0:99);
0011 %    n = [zeros(1,50) rand(1,50)];
0012 %    M = [1 0.5; 0.2 0.8];
0013 %    X = M * [s;n];
0014 %    subplot(2,1,1);
0015 %    plot(X');
0016 %    subplot(2,1,2);
0017 %    [psi,phi] = mnf2(X);
0018 %    plot(phi');
0019 
0020 
0021 [p,N] = size(X);
0022 
0023 dX = X(:,1:end-1) - X(:,2:end);
0024 
0025 [psi,D] = eig(X*X', dX*dX');
0026 
0027 phi = psi' * X;
0028 psi = psi'; % to agree with output of mnf.m

Generated on Tue 07-Feb-2006 12:02:57 by m2html © 2003