is_prime

Version:

Determines whether elements of an array of any dimension are prime numbers. A natural number is prime if and only if the only divisors of that number are 1 and the number itself.

Syntax

c = is_prime(a)
Legacy name: isprime

a

Array of any dimension of real values.

c

Array of any dimension of Boolean values. An element in c is 1 if and only if the corresponding element of a is a prime number. Otherwise, the element is 0. c is of the same size as a.

C = is_prime([5, 7, 6, 789])

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices