?? psim_lin.m
字號:
function R = psim_lin(A,b,X0,T,N)
% Compute flow pipe approximations for the `linear` (affine) dynamics
% "dx/dt = A*x + b".
%
% Syntax:
% "R = psim_lin(A,b,X0,T,N)"
%
% Description:
% The inputs are
%
% * "A": the system matrix
%
% * "b": constant input vector for the affine dynamics
%
% * "X0": a "linearcon" object represeting the initial set
%
% * "T": time step for the flow pipe approximation
%
% * "N": number of steps (flow pipe segments) to compute
%
% The output "R" is a cell array of "linearcon" objects, each representing
% an approximation to a flow pipe segments.
%
% See Also:
% fs_lin_map,seg_approx_lin,step_response,stretch_func_lin,linearcon,
% transform
% If a is invertible, precompute its inverse
if rank(A) == size(A,1)
Ainv = inv(A);
else
Ainv = [];
end
if N < 1
return
end
R = {};
SP0 = vertices(X0);
% approximate the first segment from t = 0 to t = T
R{1} = seg_approx_lin(A,Ainv,b,X0,SP0,T);
eAT = expm(A*T);
displacement = step_response(A,Ainv,b,T);
% apply affine transformation to obtain the rest of the segments
for k = 2:N
R{k} = transform(R{k-1},eAT,displacement);
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -