ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Polynom - Fitting

Solved!
Go to solution

Hi,

 

I want to implement a polynomal function 5th order. I have build a trend line in excel which outputs the correct polynomal formula. (table.jpg)

1. option: who can I implement this formula in labview? (polynom.jpg)

2. option: what is wrong with my current labview code? (code.jpg)

 

Any hints?

 

Best Regards,

 

--
Joachim

Download All
0 Kudos
Message 1 of 4
(3,364 Views)

Get the "linear ramp" from the "signal processing...signal generation" palette, pick the desired start, end, and # of points, and wire to the polynomial evaluation (where you currently have the broken wire).

 

Graph the output together with the original data on a xy graph.

 

Instead of three pictures, you could have simply attached your VI with typical data as default. It is much easier to show the problem and solution this way.

0 Kudos
Message 2 of 4
(3,355 Views)
Solution
Accepted by Joachim082

altenbach,

 

thanks for your response. The scaling of my values aren't linear.

 

I've attached the example with the solution - I have to work the the polynomial coefficient instead of the best polynomal fit.

 

Best Regards,

 

--
Joachim

0 Kudos
Message 3 of 4
(3,343 Views)

@Joachim082 wrote:

The scaling of my values aren't linear.


I never said they are linear, but if you want to draw a trendline, it makes sense to do a linear x ramp to calculate the polynomial at each point. I thought you wanted to graph a smooth trend line, e.g. as follows.

 

 

0 Kudos
Message 4 of 4
(3,324 Views)