exthsv.m

来自「剑桥大学用于线性和双线性动力学系统辨识的工具箱」· M 代码 · 共 58 行

M
58
字号
function s = exthsv(t,method)%EXTHSV   Extract distinct Hankel singular values from a set of estimates.%%   S = EXTHSV(T,METHOD) extracts Hankel singular values from the estimates%   T and outputs them in S, bearing in mind which METHOD will be used to%   identify the system. The algorithm guarantees that each of the singular%   values are strictly positive and distinct, arranged from largest S(1) to%   smallest S(end). If METHOD is 'ncf' or 'pr', then the singular values%   are also strictly less than 1.%%   See also CONHSV.%% CUED System Identification Toolbox.% Cambridge University Engineering Department.% Copyright (C) 1998-2002. All Rights Reserved.% Version 1.00, Date: 01/06/2002% Created by H. Chen and E.C. Kerrigan.n = length(t);  if strcmp(method,'sb') | strcmp(method,'mp')  % This operation is the reverse of  %     t = s;  %     for i=1:n-1  %       t(i) = s(i) - s(i+1);  %     end  %     t = log(t);     t = exp(t);     s = t(:);     for i=n-1:-1:1	s(i) = t(i) + s(i+1);   end  elseif strcmp(method,'ncf') | strcmp(method,'pr')  % This operation is the reverse of  %     t = s;  %     t(1) = log(s(1)/(1-s(1)));  %     for i=2:n  %       t(i) = log(s(i)/(s(i-1)-s(i)));  %     end    s = t(:);    s(1) = exp(t(1))/(1+exp(t(1)));  for i=2:n	s(i) = s(i-1) * exp(t(i))/(1+exp(t(i)));  end  else  error('EXTHSV: Unknown METHOD.')end

⌨️ 快捷键说明

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