.mex file for a function

1 view (last 30 days)
Putsandcalls
Putsandcalls on 13 May 2016
Answered: Walter Roberson on 13 May 2016
Hello,
I am running into some trouble for a function given by:
function y = fyrandperm(x)
% FYRANDPERM - Shuffles elements in random order.
%
% Y = FYRANDPERM(X)
% If X is a real matrix or vector then Y contains the elements
% of X in random order. If X is a real scalar then Y contains
% 1:X in random order.
%
n = prod(size(x));
if n == 1
n = x;
x = 1:n;
end
y = fyrandperm_mex(x,rand(1,n));
I did not write this function myself and I am trying to use it but the problem is that it calls to
fyrandperm_mex
which is a .mexw64 file. I am not precisely sure what to do with this as I cant really open it on my 2015b matlab for mac. Could someone please offer some advice ? The error I am running into states: Error in fyrandperm (line 20) y = fyrandperm_mex(x,rand(1,n));
Any help would be appreciated.
Thank you

Accepted Answer

Walter Roberson
Walter Roberson on 13 May 2016
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

More Answers (0)

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!