LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

creating polynomial

Solved!
Go to solution

Hello all,

 

I am working on a VI, and am stuck. How can I create a second order polynomial in general Ax^2+Bx+C, being able to use A,B and C as controls on the front panel. Sorry this may seem simple to most, as I am a newbie. I have tried using Mathscript as the simplist way, but it is not plotting correctly.

 

Please help

0 Kudos
Message 1 of 7
(9,148 Views)

Mathscript is only simple for programmers more experienced with text-based languages than with LabVIEW.

 

For a quadratic I would probably just use the Add and Multiply primitives in the Numeric palette.  For higher order polynomials or if you have an array of irregularly spaced x values use the Polynomial Evaluation.vi from Mathematics >> Polynomial (of all places!).

 

Lynn

0 Kudos
Message 2 of 7
(9,144 Views)

I had looked through the polynomial functions in labview, but could not find much help with them. The problem with adding and multiplying is how can you set x as a constant to follow the graph? Maybe I am just over thinking this, or am missing something simple.

0 Kudos
Message 3 of 7
(9,140 Views)
Solution
Accepted by topic author jhatf008

Here is a quick and dirty example.

 

Lynn

 

Polynomial.png

Message 4 of 7
(9,136 Views)

Maybe I should be a little more clear on what I want to accomplish, I want to create a second order polynomial (Ax^2+Bx+C). A,B,C and N, need to be controls on the front panel. Where N is the number of points I want it to plot of the interval of X_0 to X_N-1. Here is my block diagram so far, please offer your opinion on what to do next

0 Kudos
Message 5 of 7
(9,134 Views)

Thank You very much, I see my mistakes

0 Kudos
Message 6 of 7
(9,133 Views)

Have you figured how to enter X_0 and X_N-1?

 

Lynn

0 Kudos
Message 7 of 7
(9,128 Views)