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: 

Sum formula node

Solved!
Go to solution

Hey There

 

I'm new to Labview and need some help. I want to make a surface interpolation and use "3D p fit" for this.

 

Afterwards I want to calculate the values and show them to see how good the approx is. I use a formula node for this because I want to chose the order of polynome approx.

 

In here

 

z : output

x,y : coordinates in Array

xi,yi : index for coordinates (Where we are...) 

n : Order of polynome

 

int i,j,ci;
z=c[0];
ci=0;
for (i=1; i<=n; i++)
{
ci=ci+i;
z=z+Sum[j=0 -> i] (c[ci+j]*(x[xi]**j)*(y[yj]**(i-j));
}

 

The problem is that it always tells me that there's an error with the sum and since I can't figure it out I hope you might have some infos.

 

Hope that it is clear what I tried to describe

Thx Hans1

0 Kudos
Message 1 of 3
(4,944 Views)

Can you post the Block diagram you made for this problem...

 

Smiley Wink

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 3
(4,935 Views)
Solution
Accepted by topic author Hans1

Hey

 

I did a little work around by using a second for loop instead of the Sum. But if anybody has the same prob. that's how I solved it:

 

22777iC79EC565F4FBAE2D

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