필터 지우기
필터 지우기

Problem with min function when finding minimum value

조회 수: 4 (최근 30일)
Jyothi Alugolu
Jyothi Alugolu 2018년 2월 21일
답변: Gil Kolin 2018년 2월 21일
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).

채택된 답변

Star Strider
Star Strider 2018년 2월 21일
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.

추가 답변 (1개)

Gil Kolin
Gil Kolin 2018년 2월 21일
it suppose to work... even is 2D array you will get the min for each column. can you write your code?

카테고리

Help CenterFile Exchange에서 Numeric Types에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by