how to permute the sequence? why it takes to much time .

4 views (last 30 days)
Guillaume on 26 Jun 2019
What's really missing from the question is some context. We've been given the middle of an algorithm with no explanation of what it's trying to do. My feeling is that this algorithm is probably badly designed for matlab.
In particular, the
mod(floor(x*1e15, L)) + 1
with L = 65536 looks like a poor attempt at manipulating floating point numbers at the bit level. There are faster ways of manipulating bits. The + 1 is also puzzling, without it you get numbers that fit into a uint16, with it 99.9985% of the possible numbers fit on 16 bits, and one number, 65536, requires 17 bits.

Sign in to comment.

Answers (0)


Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!