I want to know what is wrong with this solution
finalresult=[];
for i=1:4
if true
% code
end
for j=i+1:5
result1=[];
result2=[];
result3=[];
if w(j)~=w(i)
[a,b]=sort(r(i,:),'descend');
presult1=b;
else
[c,d]=sort(r(j,:),'descend');
presult2=d(1:3);
presult3=d(4:6);
end
result1=[result1;presult1];
result2=[result2;presult2];
result3=[result3;presult3];
end
end
if true
% code
end