repo.or.cz
/
xiph
/
unicode.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Recognizes if input is ogg or not.
[xiph/unicode.git]
/
ghost
/
m-files
/
MUSIC.m
blob
dd2d1ccbf604b808550fddd165569d4826460540
1
function [R,d] = MUSIC(a, N, M);
2
M = 2*M;
3
for j=1:N
4
for k=1:N
5
A(j,k)=sum(a(j:end-N+j).*a(k:end-N+k));
6
end
7
end
8
[V,D]=eig(A);
9
G=V(:,1:N-M)*V(:,1:N-M)';
10
r=zeros(2*N-1,1);
11
for j=1:N
12
for k=1:N
13
r(j-k+N) = r(j-k+N)+G(j,k);
14
end
15
end
16
R = roots(r);
17
d = diag(D);