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

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

 채택된 답변

Friedrich
Friedrich 2014년 9월 10일
Hi,
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.

댓글 수: 3

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\toolbox\dotnetbuilder\Examples\VS8\NET\OptimizeExample
MATLABROOT is the installation folder of your MATLAB.
Or try opening the documentation and search for "BananaFunction".
Thank you very much for the help :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

질문:

2014년 9월 10일

댓글:

2014년 9월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by