help with Compiling a mex-file
39 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Abdelmalek Benaimeur
el 3 de Jun. de 2019
Comentada: Walter Roberson
el 13 de Sept. de 2023
hello Folks,
I downloaded a Matlab package for probabilistic modeling of circular data with mixtures of von Mises distributions.
please see this link
in the installation phase i have to do this :
- Clone or download this repository and add it to your MATLAB search path.
- Compile the *.mex-file located at @VonMisesMixture/private by browsing to that directory in MATLAB and running mex sampleVonMisesMex.c from the command line.
i didn't understand how to do the second step if any one can help
0 comentarios
Respuesta aceptada
Walter Roberson
el 3 de Jun. de 2019
cd to the directory that you downloaded the code into.
Give the command
mex sampleVonMisesMex.c
If the compiling works then the routine should be ready to use, callable under the name sampleVonMisesMex
Before doing all of this you need to have installed a support compiler for your operating system and release, and have given the command
mex -setup c
and chosen a compiler if more than one is offered.
0 comentarios
Más respuestas (2)
Abdelmalek Benaimeur
el 3 de Jun. de 2019
1 comentario
Walter Roberson
el 3 de Jun. de 2019
Hmmm, I do not know where they are expecting to get random() from. random() is not part of the C language standard. C++ has a header named "<random>" but none of the functions are named random()
Abdelmalek Benaimeur
el 3 de Jun. de 2019
5 comentarios
Walter Roberson
el 13 de Sept. de 2023
time() returns a time_t (data type not specified by C standard, but often some form of integer)
clock() returns a clock_t (data type not specified by C standard, but often some form of integer)
random() returns an int (not a long int)
The sum of those three is not well defined in type.
srand() requires an unsigned int parameter.
It is not obvious that adding those three types gives an appropriate parameter for srand()
Ver también
Categorías
Más información sobre MATLAB Compiler en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!