You need to get a copy of fyrandperm_mex compiled for OS-X . If the source code is available, you can use the "mex" command to compile it (after you have installed and configured a compiler for your OS-X version)
mex -v fyrandperm_mex
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!