Owning Class: membership
Requires: MathScript RT Module
c = is_prime(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.
|a||Specifies a matrix or a string.|
|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.|
The following table lists the support characteristics of this function.
|Supported in the LabVIEW Run-Time Engine||Yes|
|Supported on RT targets||Yes|
|Suitable for bounded execution times on RT||Not characterized|
C = is_prime([5, 7, 6, 789])
C = is_prime('der')