📄 dric.m
字号:
function [kerr,serr]=dric(a,b,q,r,k,s)
%DRIC Discrete Riccati equation residual calculation.
% [Kerr,Serr] = DRIC(A,B,Q,R,K,S) Computes the error in the solution
% to the discrete Riccati equation. Kerr is the error in the gain
% matrix and Serr is the residual error in the Riccati equation.
%
% -1 -1
% Kerr = K-(R+B'SB) B'SA; Serr = S - A'SA + A'SB(R+B'SB) BS'A - Q
%
% See also: RIC, DLQE, DLQR
% Copyright (c) 1986-93 by the MathWorks, Inc.
serr = s - a'*s*a+a'*s*b*((r+b'*s*b)\b'*s'*a)-q;
kerr = k - (r+b'*s*b)\b'*s*a;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -