Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
mat2cell operation coordinates cell
조회 수: 3 (최근 30일)
이전 댓글 표시
i have a program from my question in 14 feb 2013, answered by Azzi Abdelmalek.
A=rand(4,4,4,4)
[ii1,ii2,ii3,ii4]=size(A)
count=0
id=zeros(ii3*ii4,4);
for k=1:ii3
for p=1:ii4
count=count+1;
v=A(:,:,k,p);
[val,idx]=min(v(:));
[id1,id2]=ind2sub(size(v),idx);
minval(count)=val;
idx1(count)=id1;
idx2(count)=id2;
idx3(count)=k;
idx4(count)=p;
id(count,:)=[id1 id2 k p] % correspondant indices
end
end
id is matrix that contains the information of coordinates that have the minimum value. my question, how to make there will be no same blocks that have minimum value ? because there's 2 different blocks have same blocks that have minimum value. how to prevent this condition ? i mean for, i dont want the 2 of same of id1, id2 have minimum value of one k,p. one id1,id2 just for k,p.
댓글 수: 0
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!