Accessing elements of built in primes function

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일

0 개 추천

p = primes(15);
p(1) is the first element
p(2) is the second element
etc.

이 질문은 마감되었습니다.

질문:

2020년 11월 11일

마감:

2021년 8월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by