LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

product of two curves

Hello,

 

I wrote a VI that acquire voltage data from two different instruments at different time but within the same time domain. The outputs are 2-D arrays of same time domain but have different lengths. Example of the output arrays are:

 

A=[0    2    3      5     7       10;

     12  33   22    4     12     42]

 

B=[0    1    4      5.5   6.5    7    9     10;
     2     3   12     5      3      4    3     10]

 

where the first column is time, and second is voltage.

 

I'm trying to make it so that it can graph the product of the two measurements, basically just A*B. Are there any functions to do that in the graph?

 

Thanks

Max

0 Kudos
Message 1 of 5
(2,305 Views)

Before multiplying, you need to interpolate to get data for the same time points for both datasets. The interpolation palette offers a rich set of choices. If you have a mathematical model for the two curves, you could also do some nonlinear fitting.

0 Kudos
Message 2 of 5
(2,302 Views)

Thanks for your help.

 

I thought about what you suggested but I cant really interpolate because there are noise in the data. Plus I would like to do this as the VI is running and plot the result on the front panel.

0 Kudos
Message 3 of 5
(2,294 Views)

If you do not like altenbach's suggestion, then you need to specify exactly what you want to happen.

 

Using your example data you can easily multiuply the points from each array at times 0, 7, and 10.  What do you do at the other points?

 

If your data is noisy, your products will be noisy also. dealing with the noise is a separate issue.

 

Lynn

0 Kudos
Message 4 of 5
(2,285 Views)

MaxXx wrote:

I thought about what you suggested but I cant really interpolate because there are noise in the data.


The problem has nothing to do with noise.


@MaxXx wrote:

Plus I would like to do this as the VI is running and plot the result on the front panel.


Since you probably don't have programmatic access to Carnac_the_Magnificent, you cannot really interpolate. The simplest you could do is keep e.g. the last seen value for each channel in a shift register and graph the product of the two at regular intervals. 

0 Kudos
Message 5 of 5
(2,274 Views)