This is the code that was used to calculate trend emergence in RAPID data by performing phase shuffling. It is currently being reimplemented in Julia. No further development will be performed on the MATLAB version.
If you wish to use this code, please get in touch: this was written for personal use early in my PhD and is not optimised for usuability.