vendredi 2 octobre 2015

C# MLApp Feval Variable Number of Arguments

I am using a COM component to run Matlab code from a c# app.

Within this I am using the Feval function which has the following form:

matlab.Feval("MatlabFunction", 1, out result, param1, param2...., paramN);

Having the parameters passed in like this isn't very ideal as I would like to have one function matlabExecutor which can run any function but because of the way Feval takes in parameters it looks as though I will need to have a wrapper function per Matlab function.

Note: Yes I can pass in an array as a parameter but that would mean changing ALL of my Matlab scripts which I don't particularly want to do.

I've given reflection a quick go but couldn't seem to work out how to use it with a COM object.





Aucun commentaire:

Enregistrer un commentaire