k-Wave Toolbox |
![]() ![]() |
Return the maximum prime factor for a range of numbers
checkFactors(min_number, max_number)
checkFactors
loops through the given range of numbers and finds the numbers with the smallest maximum prime factors. This allows suitable grid sizes to be selected to maximise the speed of the FFT (this is fastest for FFT lengths with small prime factors).
For example, running the code checkFactors(100, 200)
produces the output
Numbers with a maximum factor of 2 128 Numbers with a maximum factor of 3 108 144 162 192 Numbers with a maximum factor of 5 100 120 125 135 150 160 180 200 Numbers with a maximum factor of 7 105 112 126 140 147 168 175 189 196
fft
, factor
![]() |
cart2grid | db2neper | ![]() |
© 2009-2012 Bradley Treeby and Ben Cox.