testing MATLAB dll using mbuild
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I want to verify dll generated in MATLAB. Hence I had referred this link below http://blogs.mathworks.com/loren/2011/04/21/deploying-multiple-c-shared-libraries/
my function signarure in matlab is function abc(TName, Flag, varargin)
to run this function from MATLAB command prompt i give his command as below
abc('parm1', 'param2', 'param3', 'path to file 1', 'path to file 2')
I want to know how can I declare the mwArray in .cpp file. I had tried
mwArray param1;
mwArray param2;
mwArray input(1, 3, mxCELL_CLASS);
mwArray arg1('param3');
mwArray arg2('path to fiel 1');
mwArray arg3(path to field 2');
input.Get(1,1).Set(arg1);
input.Get(1,2).Set(arg2);
input.Get(1,3).Set(arg3);
with this I get errors when I execute mbuild command. any help ?
is it possible to single step(debug)
Thanks in advance
1 comentario
Respuestas (2)
Kaustubha Govind
el 20 de En. de 2012
This page seems to suggest that MATLAB Compiler "creates several overloaded methods that implement the MATLAB functions. Each of these overloaded methods corresponds to a call to the generic MATLAB function with a specific number of input arguments". So you could try passing them in as 5 arguments:
mxArray *in1 = mxCreateString("param1");
mxArray *in2 = mxCreateString("param2");
mxArray *in3 = mxCreateString("param3");
mxArray *in4 = mxCreateString("path to file 1");
mxArray *in5 = mxCreateString("path to file 2");
Also, you need mxArray, not mwArray.
Ver también
Categorías
Más información sobre Deploy to C++ Applications Using mwArray API (C++03) 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!