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

📄 ric.m

📁 经典通信系统仿真书籍《通信系统与 MATLAB (Proakis)》源代码
💻 M
字号:
function [kerr,serr] = ric(a,b,q,r,k,s,n)
%RIC	Riccati residual calculation.
%	[Kerr,Serr] = RIC(A,B,Q,R,K,S) Computes the error in the solution
%	to the 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'S;  Serr = SA + A'S - SBR  B'S + Q
%
%	[Kerr,Serr] = RIC(A,B,Q,R,K,S,N) computes the error in the 
%	solution to the Riccati equation with cross weighting term.
%	          -1                                    -1
%	Kerr = K-R  (N'+B'S);  Serr = SA + A'S - (SB+N)R  (N'+B'S) + Q
%
%	See also: DRIC,ARE,LQE, and LQR.

%	Copyright (c) 1986-93 by the MathWorks, Inc.

if nargin == 7
	serr = s*a + a'*s - (s*b+n)/r*(n'+b'*s) + q;
	kerr = k - r\(n'+b'*s);
else
	serr = s*a+a'*s-s*b/r*b'*s+q;
	kerr = k - r\b'*s;
end

⌨️ 快捷键说明

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