Effacer les filtres
Effacer les filtres

how do i run a mex code in a matlab function block

2 vues (au cours des 30 derniers jours)
tochukwu victor
tochukwu victor le 25 Sep 2015
Commenté : Walter Roberson le 25 Sep 2015
I have gotten a mex code but I don't know how to run this code on a MATLAB function block. The function block is part of a smulink model.

Réponse acceptée

Walter Roberson
Walter Roberson le 25 Sep 2015
If you have a compiled mex such as a .mex64 file, then those files are treated like built-in commands whose name is the name of the mex file. You can refer to them by name in your MATLAB Function Block, without needing anything special, just as if they were a Mathworks-provided routine.
  2 commentaires
tochukwu victor
tochukwu victor le 25 Sep 2015
Thanks but please how can I refer to it?
Walter Roberson
Walter Roberson le 25 Sep 2015
By name. For example in your MATLAB function block
function result = func(u)
xyz = zeros(1,20);
xyz = NameOfMexFile(u);
result = sqrt(xyz);

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB Compiler dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by