Effacer les filtres
Effacer les filtres

To find variable storing max and min value

3 vues (au cours des 30 derniers jours)
Akshay Math
Akshay Math le 26 Fév 2020
Commenté : Adam le 26 Fév 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 commentaire
Adam
Adam le 26 Fév 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 );

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Shifting and Sorting Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by