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

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

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the basic class.

Syntax

c = factor(a)

Description

Computes the prime factorization of a given number. A number is prime if and only if the number is a positive integer with exactly one positive divisor other than 1.

Examples

Inputs

Name Description
a Specifies the number you want to factor. a is a positive integer. a has an upper limit of 2^32-1.

Outputs

Name Description
c Returns the set of prime numbers whose product equals a. c is a row vector of primes. The factors in c might repeat. For example, factor(16) returns the vector [2, 2, 2, 2].

Examples

C = factor(1000001)

Related Topics

isprime
primes


Resources


 

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