Comparison of specific values from the same matrix

1 次查看(过去 30 天)
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 中查找有关 Spline Postprocessing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by