cplxcomp.m

来自「the file contain many matlab signal sour」· M 代码 · 共 17 行

M
17
字号
function I=cplxcomp(p1,p2)
% I=cplxcomp(p1,p2)
% Compares two complex pairs which contain the same scale elements
% but(possibly)at different indices.This routine should be 
% used after CPLXPAIR routine for rearranging pole vector and its 
% corresponding residue vector.
%    p2=cplxpair(p1)
%
I=[];
for j=1:length(p2)
    for i=1:length(p1)
        if (abs(p1(i)-p2(j))<0.0001)
            I=[I,i];
        end 
    end
end 
I=i';

⌨️ 快捷键说明

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