Info

此问题已关闭。 请重新打开它进行编辑或回答。

Accessing elements of built in primes function

1 次查看(过去 30 天)
How can the a particular prime of the primes function, which returns a double, be accessed?
primes(15)
class(primes(15))

回答(1 个)

James Tursa
James Tursa 2020-11-11
p = primes(15);
p(1) is the first element
p(2) is the second element
etc.

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by