To find variable storing max and min value

2 visualizaciones (últimos 30 días)
Akshay Math
Akshay Math el 26 de Feb. de 2020
Comentada: Adam el 26 de Feb. de 2020
I have three variables say a=1 b=2 c=3 i want to find the variable storing minimum and maximum value so how to write the matlab code in matlab function block
  1 comentario
Adam
Adam el 26 de Feb. de 2020
If the values are comparable enough for min and max across them to mean something then you should put them all in a single array, then simply return the indices into that array with
[~, idxMin] = min( myArray );
[~, idxMax] = max( myarray );

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Startup and Shutdown 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