各位看下我的伪代码复现哪里出了问题。

附件中的代码如下:
P=24;%传感器数量
K=18;
U=mapminmax(V2);%归一化投影矩阵
U1=transpose(U) ;
G=U*U1-eye(300);
while P<size(G,1)
gm=max(max(G));
[im,jm]=find(G==gm);
g_max=[im,jm];%最大值所在位置
G(im,:)=[];
G(:,im)=[];
A=G(randperm(size(G,1),P),:);
if rank(A)==K
break
end
end
最后得到的理想A矩阵应该是一个PxK的矩阵,秩为K。但最后得到的结果是PxP的矩阵,秩为P

 Accepted Answer

0 votes

看了下,感觉你的程序与书本上的要求一致,看不出啥问题

More Answers (0)

Categories

Find more on MATLAB 快速入门 in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!