Borrar filtros
Borrar filtros

How to find index using max function to multi array???

3 visualizaciones (últimos 30 días)
Alan
Alan el 14 de Feb. de 2014
Comentada: Alan el 14 de Feb. de 2014
Hi all, I want to find index of maximum value in my set of experiments. However, my data are composed by 4 dimensions such as A(i,j,k,l). How can I do to find the 4 indices for maximum value in A.
for exemple: B=max(A(:));
So, B=maximum value;
Now I want to find index of this value on my four dimensions.
thanks

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 14 de Feb. de 2014
Editada: Azzi Abdelmalek el 14 de Feb. de 2014
A=rand(3,4,2,5);
[ii,jj]=max(A(:));
[a,b,c,d]=ind2sub(size(A),jj)

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by