Download the MATLAB codes here (the resonance algorithm and the extended Dijkstra's algorithm).