Could someone explain below part of code please ? I do not understand the first part [~,b]

1 vue (au cours des 30 derniers jours)
[~,b] = min(abs(RealEL1));

Réponse acceptée

Matt J
Matt J le 4 Oct 2017
Modifié(e) : Matt J le 4 Oct 2017
These are the outputs of the min() function. b is the location of the minimum value. ~ means that the first output argument, the minimum value itself, is not to be assigned to any variable.
  2 commentaires
Matt J
Matt J le 4 Oct 2017
You're welcome, but if your question has been answered, please click "Accept".

Connectez-vous pour commenter.

Plus de réponses (1)

Guillaume
Guillaume le 4 Oct 2017
The ~ ignores the first output of min as you're only interested in the index of the minimum, not its actual value.

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!

Translated by