LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convolution and correlation

Hello! How can i compute c code in lavbeiw? I have output data from two signals in array form x(i) and y(i). I want to calculate cross-correlation and kenerl of two signals. Like from c codes, I need to shift signal x(t) and convolute two signal. Numbers of loop can be defined as controlabled.

for( j=0;j<r1;j++)
	{
		double h=0
		for( i=j+1;i<n;i++)
		{
			h+=y[i]*x[i-j];
		}
       // printf("%f  %d  ",h,i-j);
		H1[j]=h/(k*(i-j));
		printf(" H1[%d] = %f\n",j,H1[j]);
0 Kudos
Message 1 of 3
(2,032 Views)

Start with any of the LabVIEW tutorials.  Everything in your C code below can be accomplished with just a few basic functions.

 

If you have already been through the tutorials and have tried something in LV, post that and let us know what you're having trouble with (i.e. exactly what it is/is not doing that you don't understand).

0 Kudos
Message 2 of 3
(2,029 Views)

LabVIEW has convolution functions built in, but you could even roll your own using relatively simple code. Where are you having problems?

0 Kudos
Message 3 of 3
(2,012 Views)