cntrable.m

来自「市面上电力系统的范例 直得收藏学习的ㄧ本书」· M 代码 · 共 18 行

M
18
字号
function  S = cntrable(A,B)
%  H. Saadat 1998
clc
% discr=[
%' The  function S=cntrable(A,B) returns the transformation matrix  '
%' S = [B AB A^2B . . . A^(n-1)B].  The system is completely state  '
%' controllable if and only if S has a rank of n.                   '
%'                                                                  '];
n=length(A);
  for i=1:n;
  S(:,n+1-i) = A^(n-i)*B;
  end
  if rank(S)~=n
  disp('System is not state controllable')
  else
  disp('System is state controllable')
  end

⌨️ 快捷键说明

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