⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 het_computebase.m

📁 计算动力学系统的分岔图
💻 M
字号:
%function  [Q0,evl,NSub] =  Het_computeBase(hom, A0, unstable_flag, NSub)
%
% Compute an orthonormal basis Q0 for the invariant subspace
% corresponding to the NSub 
%       most unstable eigenvalues of A0 if unstable_flag = 1
%   and most stable eigenvalues of A0 if unstable_flag = 0.
%
% If resizeable_flag is true, then the size of the space NSub may
% be adjusted. 

function  [Q0,evl,NSub] = Het_computeBase(A0, unstable_flag, NSub)
evl = eig(A0);
if unstable_flag
    
    % Compute all eigenvalues and eigenvectors and check number of unstable
    % ones
   
    % Compute eigenvalues and -vectors, ordered
    % (the ones with largest norm are first)
    
    [VU, DU] = eigs(A0,size(A0,1),'LM');
    % Select first NSub eigenvectors: unstable eigenspace
    VU = VU(:,1:NSub);
    % Compute orthonormal basis for the eigenspace
    [Q0,RU] = qr(VU);
    
else
    
    % Compute all eigenvalues and eigenvectors and check number of stable
    % ones
 
    % Compute eigenvalues and -vectors, ordered
    % (the ones with smallest norm are first)
    
    [VS, DS] = eigs(A0,size(A0,1),'SM');
    % Select first NSub eigenvectors: stable eigenspace
    VS = VS(:,1:NSub);
    % Compute orthonormal basis for the eigenspace
    [Q0,RS] = qr(VS);
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -