y02ox.m
来自「A Matlab toolbox for exact linear time-i」· M 代码 · 共 35 行
M
35 行
% Y02OX - From a matrix of (sequential) free responses to an % extended observability matrix (and a state sequence).%% [O,X] = y02ox(y0,n,tol)%% Y0 - matrix of (sequential) free responses % (Y0(:,i) is a free response)% LMAX - upper bound on the system lag% N - optional order of the system% TOL - tolerance for order selection, default 1e-7% If TOL < 0, the SVs are plotted and an input is asked.% O - extended observability matrix% X - state sequencefunction [O,X] = y02ox(y0,n,tol)% SVD of the matrix of (sequential) free responses [U,S,V] = svd(y0,0);s = diag(S);% if not given, determine the orderif (nargin < 3 | isempty(tol)) tol = [];endif (nargin < 2 | isempty(n)) n = order(s,tol);end% Rank revealing factorizationsqrt_s = sqrt(1./s(1:n))';O = sqrt_s(ones(size(U,1),1),:) .* U(:,1:n);if nargout > 1 X = (sqrt_s(ones(size(V,1),1),:) .* V(:,1:n))';end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?