Contents Previous Next Subchapters

Matrix Elements That are Prime Numbers
Syntax isprime(x)
See Also ceil , floor , roundoff , int , mod

Description
Returns a logical valued matrix that has the same dimensions as x containing true for the elements of x that are prime and false otherwise.

Example
     isprime(1:1:11)'
returns
     [ F , T , T , F , T , F , T , F , F , F , T ]