view arrows/aeig.m @ 42:ae596261e75f

Various fixes and development to audio handling
author samer
date Tue, 02 Dec 2014 14:51:13 +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