Matlab: matlab中"primes"的反函数

Matlab : Opposite function of "primes" in matlab

matlab中有"primes"的相反函数吗?

(质数:小于或等于输入值的质数)

如果我想找到大于或等于输入值怎么办?

谢谢。

您始终必须提供上限。如果你想要素数 "greater than or equal to the given value," 它们会无穷大。

我建议从 "less than or equal to," 开始为函数提供上限,然后使用条件过滤掉那些太小的。