idenmatrix.m

来自「对于一类非最小二乘问题」· M 代码 · 共 18 行

M
18
字号
function [A b]=idenMatrix(y,MOP)
%construct matrix A and b for identification
%y: measured output
%MOP: determin the order of estimated model
%%Ao*y(t)=Co*e(t);MOP=[length(Ao)-1 length(Co)-1];

%for AR
dataLen=length(y);
A=zeros(dataLen-MOP(1),MOP(1));
for i=1:dataLen-MOP(1)
    A(i,:)=-y(i:i+MOP(1)-1);
end

b=y(MOP(1)+1:end);



⌨️ 快捷键说明

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