Member of the membership class.
c = isprime(a)
Determines whether elements of a matrix are prime numbers. A natural number is prime if and only if the only divisors of that number are 1 and the number itself.
| Name | Description |
| a | Specifies a matrix or a string. |
| Name | Description |
| c | Returns a matrix of Boolean values. An element in c is 1 if and only if the corresponding element of a is prime. Otherwise, the element is 0. If a is a string, each element in c corresponds to a character in a. If a is a matrix, c is a matrix of the same size as a. If a is a string, c is a matrix with as many elements as there are characters in a. |
C = isprime([5, 7, 6, 789])
C = isprime('der')