![]() |
给定向量a = [1,2,3.2,4,5]和元素x = 3在向量a中,如何找到大于x的确切项?
给定向量a = [1,2,3.2,4,5]和元素x = 3在向量a中,如何找到大于x的确切项?
[B]回答:[/B] 我不确定您所说的“精确”输入是什么意思。这将为您提供[I]所有[/I]大于x的值的索引: indices = find(a > x); 假设a已经排序,这将为您提供第一个索引(即,大于x的最小值): index = find(a > x,1); [url=https://stackoverflow.com/questions/3593717]更多&回答...[/url] |
所有时间均为北京时间。现在的时间是 14:17。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.