完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
你好,我有一个不同的大数组与实数。
在那里我想找到我能用max() - 函数做的最大值。然后我想知道这个max-value在哪个索引处。 目前我使用一个循环来比较每个数组元素与之前找到的最大值。但这非常慢。 有没有更快的方法呢? 谢谢您的帮助 以上来自于谷歌翻译 以下为原文 Hello, i have a vary big array with real-numbers. In there i want to find the maximum what i can do with the max()-function. Then i want to know at which index this max-value is. Currently i do it with a loop that compares each array-element with the previous found max-value. But this is extremly slow. Is there a faster way o do it? Thanks for the help |
|
相关推荐
1个回答
|
|
|
只需使用maxX()内置函数。
它返回最高值的索引。 以上来自于谷歌翻译 以下为原文 Just use the maxX() built-in function. It returns the index of the highest value. |
|
|
|
|
只有小组成员才能发言,加入小组>>
1844 浏览 0 评论
2739 浏览 1 评论
2640 浏览 1 评论
2449 浏览 5 评论
3458 浏览 3 评论
1845浏览 0评论
417浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 09:37 , Processed in 1.091067 second(s), Total 72, Slave 55 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
12614