필터 지우기
필터 지우기

Comparison of specific values from the same matrix

조회 수: 1 (최근 30일)
stelios loizidis
stelios loizidis 2020년 10월 3일
댓글: stelios loizidis 2020년 10월 3일
Hello.
I have the following problem: I have a table Z (1X100). The first value is always zero. I want to find among the other values which is the smallest and from which position of the matrix it comes. I wrote the code below but it does not work.
for w=1:100
if Z>0
[min_price,Index]=min(Z)
end
end
Your help is important.

채택된 답변

KSSV
KSSV 2020년 10월 3일
[val,idx] = min(Z(2:end))

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by