Are the methods of my MATLAB object exposed from the compiled .NET component with MATLAB Builder NE?
    3 views (last 30 days)
  
       Show older comments
    
    MathWorks Support Team
    
 on 29 Jul 2013
  
    
    
    
    
    Commented: Martin Lechner
      
 on 19 Jan 2017
            I have created a simple object oriented MATLAB class and defined some properties and public methods. When I compile the class into a .NET component using MATLAB Builder NE, I cannot see any of those methods. I did not get any errors while creating the component.
The MATLAB class is as follows:
classdef TestClass    
      properties (SetAccess = public, GetAccess = public) 
          v = 0;
      end
      methods (Access = public) 
          function pout = GetV(TestClass)
              pout=TestClass.v;
          end
      function TestClass = SetV(TestClass,inv) 
              TestClass.v = inv;
          end  
      function TestClass = Doit(TestClass,inv)
             TestClass.v = TestClass.v + inv;
          end
      end
Accepted Answer
  MathWorks Support Team
    
 on 29 Jul 2013
        The ability to expose the methods of a MATLAB class is not currently available in MATLAB Builder NE.
To work around this issue, create a wrapper MATLAB function for each public method of the MATLAB class and deploy these wrapper functions.
1 Comment
  Martin Lechner
      
 on 19 Jan 2017
				I also requested this feature but got only the answer that there exists an internal enhancement request since 2008 with a low chance for implementation. For me this is also an unacceptable limitation because my code heavily uses Matlab classes.
More Answers (0)
See Also
See Also
Categories
				Find more on Startup and Shutdown in Help Center and File Exchange
			
	Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
