Dear All,

I want to have a code with a formula

N-1 N-1

aut[m]=summation x(n)x(n+m)

n=0 n= 0

if I have code like

will this work?Code:`for (m=0;m<N;m++)`

{

for (n=0;n<N;n++)

{

aut[m]+=x(n)*x(n+m);

}

}

Printable View

- 10-20-2003lwongsimple question
Dear All,

I want to have a code with a formula

N-1 N-1

aut[m]=summation x(n)x(n+m)

n=0 n= 0

if I have code like

Code:`for (m=0;m<N;m++)`

{

for (n=0;n<N;n++)

{

aut[m]+=x(n)*x(n+m);

}

}

- 10-20-2003VegasSte
Have you tried it in a c compiler?

It seems sound enough! - 10-20-2003lwong
Yes, I have complied it, no any error, but the results are out of my expectation. say x(n) is a sequence like:

Code:`x(n)={1.0,2.0,3.0,3.5}, and N=4.`

Thank you. - 10-21-2003WaltPQuote:

*Originally posted by lwong*

**Yes, I have complied it, no any error, but the results are out of my expectation. say x(n) is a sequence like:**

Code:`x(n)={1.0,2.0,3.0,3.5}, and N=4.`

Thank you.