How could I transfer the function from C# to Matlab?

4 ビュー (過去 30 日間)
Limin Wang
Limin Wang 2016 年 11 月 18 日
回答済み: Walter Roberson 2016 年 11 月 18 日
Hello all,
I want to pack the gaoptimset method:( FINESSfCN,nvars,...)in the matlab toolbox as a Class(.NET assembly) so I can use in my C# program, but FINESSfCN is a function in my C# program. What should I do to transfer the function in the C# to the gaoptimset method?

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 11 月 18 日
FINESSfCN would need to have an feval() method, and it would have to return a MATLAB structure of default arguments when it was invoked with a single parameter which was the string 'defaults'
I would suggest that you instead just use gaoptimset() without passing in the function handle, and pass in name/value pairs for everything you want to be non-default.

カテゴリ

Help Center および File Exchange.NET Methods in MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by