From 12:00 PM - 8:00 PM CST on Thursday, October 18, ni.com will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Table Of Contents

primes

Version:
    Last Modified: March 15, 2017

    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.

    Syntax

    c = primes(a)

    Inputs

    a

    Scalar. a can be a decimal number, char or logical. a must be less than or equal to 2^32-1.

    Outputs

    c

    Primes less than a. c is a row vector.

    C = primes(101)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics