Borrar filtros
Borrar filtros

When I use the MinMax block in simulink, how can I determine the index of the MinMax value?

3 visualizaciones (últimos 30 días)
When I use the for loop block in Simulink. I generate an array from the for loop. After that, I apply the min to find the minimum of the array. I would like to know what index is corresponding to this minimum value.

Respuestas (1)

Don Zheng
Don Zheng el 8 de Jun. de 2017
Try the Logical Operator block and the Find Nonzero Elements block.
  1 comentario
Ashraf Omran
Ashraf Omran el 8 de Jun. de 2017
Thank you Don. You are using the same way that I am using. I was thinking about a built-in-block in Simulink to do so. For example, when we use y = min(x) we can extended to [y,i]= min(x). I was looking for the same in Simulink. May be in the upcoming version, we will have that option.

Iniciar sesión para comentar.

Categorías

Más información sobre Simulink Functions en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by