# usr/bin bla # Using FFTW for fractional calculus use PDL; use PDL::Complex; use PDL::IO::Misc; use PDL::FFTW; $PDL::IO::Misc::colsep="\t"; $cols=2; $rows=0; open (DATA_1, "data.dat") || die "File not found\n"; $j=-1; while () { $j++; chomp($_); my @dummy=split(/\t/, $_); (@voltage[$j]) = @dummy[0]."\n"; (@current[$j]) = @dummy[1]."\n"; } close(DATA_1); print @voltage; print "\n\n"; print @current; print "\n\n"; $pdlcurrent = pdl(@current); print nelem ($pdlcurrent); print "\n\n"; # until this point everything works fine $fft_test = fftw ($pdlcurrent);