Skip to content

Commit e7f37ce

Browse files
gunjjoshikgryte
andauthored
Update README examples
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>
1 parent 274ca8e commit e7f37ce

1 file changed

Lines changed: 6 additions & 11 deletions

File tree

  • lib/node_modules/@stdlib/fft/base/fftpack/rffti

lib/node_modules/@stdlib/fft/base/fftpack/rffti/README.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -114,28 +114,23 @@ The function accepts the following arguments:
114114
var Float64Array = require( '@stdlib/array/float64' );
115115
var rffti = require( '@stdlib/fft/base/fftpack/rffti' );
116116
117-
var workspace;
118-
var N;
119-
var nf;
120-
var i;
121-
var j;
122-
123-
N = 8;
124-
workspace = new Float64Array( ( 2*N ) + 34 );
117+
var N = 8;
118+
var workspace = new Float64Array( ( 2*N ) + 34 );
125119
126120
rffti( N, workspace, 1, 0 );
127121
128122
console.log( 'Sequence length: %d', N );
129123
console.log( 'Twiddle factors:' );
124+
var i;
130125
for ( i = N; i < 2*N; i++ ) {
131126
console.log( ' workspace[%d] = %d', i, workspace[ i ] );
132127
}
133128
134129
console.log( 'Factorization:' );
135-
nf = workspace[ ( 2*N ) + 1 ];
130+
var nf = workspace[ ( 2*N ) + 1 ];
136131
console.log( ' number of factors: %d', nf );
137-
for ( j = 0; j < nf; j++ ) {
138-
console.log( ' factor[%d]: %d', j, workspace[ ( 2*N ) + 2 + j ] );
132+
for ( i = 0; i < nf; i++ ) {
133+
console.log( ' factor[%d]: %d', i, workspace[ ( 2*N ) + 2 + i ] );
139134
}
140135
```
141136

0 commit comments

Comments
 (0)