Problem with min function when finding minimum value
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Jyothi Alugolu
le 21 Fév 2018
Réponse apportée : Gil Kolin
le 21 Fév 2018
I am trying to find the minimum value in a vector of type double by using min function.It is showing the error as Index exceeds matrix dimensions . Ex:I have a vector named min_values of size 1*200 with double values..I am trying to find the minimum value by using min(min_values).
0 commentaires
Réponse acceptée
Star Strider
le 21 Fév 2018
You probably have a variable that you mistakenly named ‘min’. (This is called ‘overshadowing’ a MATLAB function with a variable.)
Type this in your Command Window:
which min -all
If the first result is:
min is a variable.
You have found the problem. The solution is to rename the variable ‘min’ to something else.
0 commentaires
Plus de réponses (1)
Gil Kolin
le 21 Fév 2018
it suppose to work... even is 2D array you will get the min for each column. can you write your code?
0 commentaires
Voir également
Catégories
En savoir plus sur Logical 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!