Skip to content

Commit 812287f

Browse files
committed
update doc with native-complex idiom
1 parent 25af72c commit 812287f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

README.pod

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ PDL::FFTW3 - PDL interface to the Fastest Fourier Transform in the West v3
1111
# Basic functionality
1212
my $x = sin( sequence(100) * 2.0 ) + 2.0 * cos( sequence(100) / 3.0 );
1313
my $F = rfft1( $x );
14-
gplot( with => 'lines', inner($F,$F));
14+
gplot( with => 'lines', $F->abs );
1515

1616
=====>
1717

@@ -64,8 +64,7 @@ PDL::FFTW3 - PDL interface to the Fastest Fourier Transform in the West v3
6464

6565
# compute the correlation
6666
my $F12 = rfft1( cat($y1,$y2) );
67-
my $corr = irfft1( Cmul( $F12(:,:,(1)),
68-
Cconj $F12(:,:,(0)) ) );
67+
my $corr = irfft1( $F12(:,(1)) * $F12(:,(0))->conj );
6968
# and find the peak
7069
say maximum_ind($corr);
7170

0 commit comments

Comments
 (0)