1、关于Kron降阶的叙述
- %% 组织:东北电力大学
- %% 作者:Yang Zheng
- %% 日期:2022-11-6
- function Y_new=kron(Y,Reduction_index)
- %Y为需要降阶的矩阵
- %Reduction_index为降阶节点
- [raw,column]=size(Y);
- Y_new=zeros(raw,column);
- Reduction_mat=[];
- for n = 1:max(size(Reduction_index))
- for i = 1:raw
- if(ismember(i,Reduction_mat))
- continue;
- end
- for j = 1:column
- if(ismember(j,Reduction_mat))
- continue;
- end
- Y_new(i,j)=Y(i,j)-Y(i,Reduction_index(n))*Y(Reduction_index(n),j)/Y(Reduction_index(n),Reduction_index(n));
- end
- end
- Reduction_mat=[Reduction_mat Reduction_index(n)];
- Y=Y_new;
- end
- Y_new=Y;
- end
-
- %test
- % Y=[
- % 5+6i, -1-2j,0, -4-4i;
- % -1-2i,6+9i ,-3-4i,-2-3i;
- % 0, -3-4i,7+8i, -4-4i;
- % -4-4i,-2-3i,-4-4i,10+11i;];
- % Reduction_index=[2 4];