Skip to content
Snippets Groups Projects
Commit 01c4feaa authored by Felix Kong's avatar Felix Kong
Browse files

stable regression doesnt work right. ST > 0 is not true

parent b63afe3b
No related merge requests found
......@@ -70,7 +70,8 @@ classdef dmd < handle
end
function stableRegression(obj,varargin) % argument is truncation rank r
% Follows Ian Manchester's not-yet published work on stable
warning('stableRegression() doesn''t work - something is wrong.');
% Follows Ian Manchester's not-yet-published work on stable
% least squares
if nargin == 2
obj.r = varargin{1};
......@@ -100,6 +101,10 @@ classdef dmd < handle
Sigma_zz = ztilde*ztilde'/N;
Sigma_s = (Sigma_xx + Sigma_zz)/2;
ST = [Sigma_xx, Sigma_zx;
Sigma_zx', Sigma_zz];
disp(eig(ST));
obj.Atilde = Sigma_zx/Sigma_s;
[obj.W,obj.Lambda] = eig(obj.Atilde);
......
......@@ -13,7 +13,9 @@ vortex_dmd = dmd(VORTALL,verbose);
% Step 2: perform DMD regression on data
truncation_rank = 21; % rank to truncate reduced dynamics to
vortex_dmd.regression(truncation_rank);
% vortex_dmd.regression(truncation_rank);
vortex_dmd.stableRegression(truncation_rank);
disp(max(abs(eig(vortex_dmd.Atilde))));
% Step 3: reconstruct VORTALL(:,2:end) using DMD approximation
X2hat = vortex_dmd.reconstruct(); % not used in the script
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment