LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

formula node for array


hi
  i want to convert the values of an array using a different formula for each value in the array.     Can i use formula node for this?    if yes how

if no then is there any other method except for extracting each one individually and converting?
0 Kudos
Message 1 of 8
(4,157 Views)
How different are the formulas? Can you give some examples?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 8
(4,152 Views)
And how many elements in the array? Does that vary?
0 Kudos
Message 3 of 8
(4,147 Views)
there are 16 elements in the array and the number remains constant (actually they are temp values acquired by a fieldpoint hardware).
 
the formula is a linear conversion (for example y = m*x + C) corresponding to the calibration curve of individual thermocouple connected to the fieldpoint hardware.   every thermocouple has a different calibration curve and hence every element in the array is converted using a different linear formula.
0 Kudos
Message 4 of 8
(4,132 Views)
Are all the formulas polynomials? If so, then just create an array of coefficients (some values might be zero) and feed that to the calculation nodes. Most of the math function primitves are polymorphic. They take arrays as well as scalars. You may not need a formula node or a loop.

Lynn
0 Kudos
Message 5 of 8
(4,125 Views)
Lynn - Exactly the direction I was moving in when asking the questions that I did.

Kunal - The basic concept here is that you want to do as much processing as possible treating the array data as an array. For best performance, you should only break an array apart and index through it as a last resort.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 8
(4,119 Views)


@kunal227 wrote:
there are 16 elements in the array and the number remains constant (actually they are temp values acquired by a fieldpoint hardware).
 
the formula is a linear conversion (for example y = m*x + C) corresponding to the calibration curve of individual thermocouple connected to the fieldpoint hardware.   every thermocouple has a different calibration curve and hence every element in the array is converted using a different linear formula.

All you need is an array of [m] and an array of [C], all the same size as your data arrray. No formula node needed.

(I think that's what mikeporter had in mind above)

Message Edited by altenbach on 07-24-2007 03:38 PM

Message 7 of 8
(4,111 Views)

got it.  it works. thanx a lot
0 Kudos
Message 8 of 8
(4,104 Views)