I want a library from a group of .m files for using in matlab

1 visualización (últimos 30 días)
aazam
aazam el 22 de Jun. de 2013
Hi
I have two .m files:
function z=*Sum*(x,y)
z=x+y;
end
function z=*Subtraction*(x,y)
z=x-y;
end
I want a library from two files. I want use this library in matlab. I want to invoke Sum and Subtraction from this library and get their outputs.
with mcc -m i does not have a .dll file, but .exe file. I want dll file from Sum.m and Subtraction.m.
This line can not help me: mcc -t -L C -W lib:mylib -T link:lib Sum.m Subtraction.m libmmfile.mlib

Respuestas (3)

Shashank Prasanna
Shashank Prasanna el 22 de Jun. de 2013

aazam
aazam el 22 de Jun. de 2013
Thank you But i can not use it, because licence
I give more details:
calllib('mylib','Subtraction', 10, 20);
??? Error using ==> calllib
Method was not found.
calllib('mylib','mlxSubtraction', 10, 20);
??? Error using ==> calllib
No method with matching signature
Subtraction has changed into mlxSubtraction in dll file. why?
In mcc, we must use -t -L C? I want a library from a group of .m files. I want to use these functions in matlab program, not in C program ant not in C++ and ...

aazam
aazam el 24 de Jun. de 2013
Hi
I reached to this solution, but output is zero. why?
z=[];
calllib('mylib','mlfSum', 1, z, 10, 20);
But Sum.m has two inputs and mlfSum has 4 inputs.

Categorías

Más información sobre C Shared Library Integration en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by