Greatest Common Factor Reference Example for LabVIEW FPGA

Publish Date: May 06, 2010 | 5 Ratings | 3.00 out of 5 | Print | 1 Customer Review | Submit your review

Overview

This example returns the Greatest Common Factor of up to ten values using the Euclidian algorithm. This function is not safe for Single-Cycle Timed Loops (SCTLs).

There are two functions in this package.  GCF_2.vi receives two values and computes their greatest common factor. GCF_N.vi receives an array of up to ten values and iteratively calls GCF_2.vi to compute the GCF of all of them.

Back to Top

Customer Reviews
1 Review | Submit your review

Error on the N VI.  - Sep 9, 2014

On the N vi, you need to add 1 to the size of the array, with the result as an input of iteration terminal of the For loop. Because first iteration computes the GCF of the array first element and 0.

Bookmark & Share


Downloads

Attachments:

gcf_n.vi

Requirements


Ratings

Rate this document

Answered Your Question?
Yes No

Submit