Borrar filtros
Borrar filtros

find maximum value indices

1 visualización (últimos 30 días)
shobhit mehrotra
shobhit mehrotra el 10 de Feb. de 2015
Comentada: per isakson el 10 de Feb. de 2015
Im trying to find the indices number of the max of a certain function.
delcx(:,n) = (massch4(max(longm(dataind{n}))))
I want to find the massch4 at the location where longm is a max value. Can I do that in one line? Can I use the find function?
Thanks!
  10 comentarios
shobhit mehrotra
shobhit mehrotra el 10 de Feb. de 2015
I have that in another line, once I can get the indices Ill substitute it in
per isakson
per isakson el 10 de Feb. de 2015
Replace
find( longm == max(longm(dataind{n})) )
by
find( longm == max(longm(dataind{n})), 1, 'first' )

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Write Unit Tests en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by