gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
findSubSpace.m
Go to the documentation of this file.
1 %/* Copyright 2000-2018 Matt Flax <flatmax@flatmax.org>
2 % This file is part of GTK+ IOStream class set
3 %
4 % GTK+ IOStream is free software; you can redistribute it and/or modify
5 % it under the terms of the GNU General Public License as published by
6 % the Free Software Foundation; either version 2 of the License, or
7 % (at your option) any later version.
8 %
9 % GTK+ IOStream is distributed in the hope that it will be useful,
10 % but WITHOUT ANY WARRANTY; without even the implied warranty of
11 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 % GNU General Public License for more details.
13 %
14 % You have received a copy of the GNU General Public License
15 % along with GTK+ IOStream
16 %*/
17 
18 function eigenvals=findSubSpace(signal, f, mask)
19 %load /tmp/signal.mat
20 %signal=s;
21 signal=signal(:); % ensure a column vector
22 %clear s
23 p=round(.25*length(signal)); % Estimate for a large number of sinusoids
24 % this is a correlation matrix
25 signal=signal(fliplr(repmat(1:2*p,length(signal)-2*p+1,1))+repmat((1:length(signal)-2*p+1)',1,2*p)-1)/sqrt(length(signal)-(2*p-1));
26 size(signal);
27 [U,S,eigenvects] = svd(signal,0);
28 eigenvals = diag(S).^2; % We need to square the singular values here
29 
30 %UHat=U; SHat=S; eigenvectsHat=eigenvects; eigenvalsHat=eigenvals;
31 %load /tmp/results.mat
32 %stack=dbstack; dbstop(stack(1).name,stack(1).line+1) % stop octave & debug from the next line onwards
33 
34 end
function eigenvals
Definition: findSubSpace.m:18
signal
Definition: findSubSpace.m:21
ensure a column vector clear s p
Definition: findSubSpace.m:23
double precision function round(x)
Definition: round.f:2
gtkIOStream: /tmp/gtkiostream/mFiles/findSubSpace.m Source File
GTK+ IOStream  Beta