Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

mat2cell operation coordinates cell

3 visualizaciones (últimos 30 días)
Internazionale
Internazionale el 8 de Mzo. de 2013
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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.

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by