MATLAB Answers


How can I pass my C# function in Matlab functions input parameters?

Asked by Muhammad Bilal on 10 Sep 2014
Latest activity Commented on by Muhammad Bilal on 10 Sep 2014
Hello Everyone!
I have a scenario that I have some function written in c# and some in Matlab, I have generated native C# dll from matlab, and the matlab function argument takes one function and I want C# function to be executed by that. So i want to pass my c# function when call the matlab function from C#. Can this be done? If so can any one help me :(.
Thanks, Bilal


Sign in to comment.

1 Answer

Friedrich 님의 답변 10 Sep 2014
 채택된 답변

yes that can be done and there is an example in the documentation which does exactly that. See here
>> web(fullfile(docroot, 'dotnetbuilder/ug/microsoft-visual-basic-integration-examples.html#bswl6fh-1'))
or online.


Hi, thanks, i'm unable to open the link can you please share things here.
It a lot and it's also points to the shipped demo files. Try looking up the source:
MATLABROOT is the installation folder of your MATLAB.
Or try opening the documentation and search for "BananaFunction".
Thank you very much for the help :)

Sign in to comment.