invoke Matlab object's (directory) method from .Net
显示 更早的评论
0 down vote favorite
I defined a class with a bunch of methods stored in a method directory. I can instantiate the class and invoke its methods within matlab. However, if I try to do the same from .NET/COM I get this error messages:
"??? Reference to non-existent field 'test'.\n\n"
Here test is the method.
My class is derived from handle and I have tried both possibilities: method defined in class file and directory method. Neither works!
Any feedback would be very much appreciated. Many thanks.
PS:
C# code:
MLApp.MLApp matlab = new MLApp.MLApp();
matlab.Execute("clear;");
matlab.Execute("Object = Class1();");
string test = matlab.Execute("Object.test()");
Working matlab code:
clear;
Object = Class1();
Object.test()
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Get Started with Microsoft .NET 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!