Bonjour,
I have to do a macro .i a have sample value from 1 to 8192
for the 1 st harmonics i done it but to find the rest i must used loop function
the step are as follows
1 Sample one is multiplied by cos (2*3.142*1/8192* 1) and the result is entered into cell one of a column labelled “cos”
Sample two is multiplied by cos(2*3.142*2/8192*1 ) and the result is entered into cell two of column “cos”. Notice : the number in red has changed from 1 to 2
And so on to sample 8192.
2 Sample one is multiplied by sin(2*3.142*1/8192*1) and the result is entered
into cell one of a column labelled “sine”
Sample two is multiplied by sin (2*3.142*2/8192*1) and the result is entered into cell two of column “sine”. Notice : the number in red has changed from 1 to 2
And so on to sample 8192
3 The sum of column “cos” divided by 4096 , is entered into cell X at the bottom of column “cos”.
4 The sum of column “sine” divided by 4096, is entered into cell Y at the bottom of column “sine”.
5 The square root of ((X2 + Y2)/2)) is worked out and entered into the first cell of a column called “harmonics”. It is the FIRST harmonic derived from the SAMPLES
6 The following harmonics are worked out in the same way but after incrementing the number in blue above by one each time: for harmonic2 the number is 2; for harmonic 3, the number is 3 etc.
IT IS NOT NECESSARY TO CONSERVE THE “WORKING” COS AND SINE COLUMNS.
The exercise is repeated up to harmonic 1001. This will complete the treatment of one POINT.
Configuration: Windows XP
Opera 9.80