.mex file for a function

14 次查看(过去 30 天)
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

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by