Example Code

Convert Array of Polynomials to Formula String Input

Code and Documents

Attachment

Overview
This example provides a code snippet to easily create the 'formula' string input to some of the VI's in the Optimization palette, such as "Brent with Derivatives 1D.vi".


Description
It accepts an array of polynomial coefficients (doubles) as an input, and outputs the string formula. There is a brief example of how to use the resulting 'formula' string in one of the Optimization functions.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Download and unzip the attached file to your computer.
  2. Open the VI “Array of Polynomial Coefficients to Formula String 2012 NIVerified.vi”.
  3. Input data to 'Array'.
  4. Run the VI.

 

Additional Information or References
VI Snippet

 VI Snippet.png

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

Ryan C.
Applications Engineer
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.