invoke Matlab object's (directory) method from .Net
Afficher commentaires plus anciens
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()
Réponses (0)
Catégories
En savoir plus sur Get Started with Microsoft .NET dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!