Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

primes (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the matrix class.

Syntax

c = primes(a)

Description

Computes all primes less than or equal to a number you specify. A natural number is prime if and only if the only divisors of that number are 1 and the number itself.

Examples

Inputs

Name Description
a Specifies a natural number. a must be less than or equal to 2^32-1.

Outputs

Name Description
c Returns all primes less than a. c is a row vector.

Examples

C = primes(101)

Related Topics

isprime
factor


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit