Mercurial > hg > ishara
view arrows/aeig.m @ 6:0ce3c2070089
Removed duplicate code and fixed doc in timed_action.
author | samer |
---|---|
date | Mon, 14 Jan 2013 14:33:37 +0000 |
parents | 672052bd81f8 |
children |
line wrap: on
line source
% aeig - Arrow for eigenvalue/vector decomposition % % aeig :: N:natural, I:[[M]->[N]] -> arrow( {[[N,N]]}, {[[N,M]], [[M]]}, empty). function o=aeig(N,I) J=(1+N)-I; o=arr(@eigsI,'sizefn',@(sz){[N,length(I)],[length(I),1]}); function [V,d]=eigsI(A) [V,D]=eig(A.cov); V=V(:,J); d=diag(D); d=d(J); end end