如何在Matlab中获取数组中最小元素的索引? [英] How do I get the index of the smallest element in an array in matlab?

查看:1934
本文介绍了如何在Matlab中获取数组中最小元素的索引?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获取matlab中数组中最小元素的索引?

How do I get the index of the smallest element in an array in matlab?

推荐答案

[C,I] = min(...)查找A最小值的索引,并将其返回到输出向量I中.如果存在多个相同的最小值,则返回找到的第一个最小值的索引.

[C,I] = min(...) finds the indices of the minimum values of A, and returns them in output vector I. If there are several identical minimum values, the index of the first one found is returned.

这篇关于如何在Matlab中获取数组中最小元素的索引?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆