Does classdef work with BuilderNE?

조회 수: 8 (최근 30일)
Tim Wang
Tim Wang 2011년 3월 25일
Does anybody know if BuilderNE can support classes and properties that are defined using classdef and if so, have some sample code/instructions on how to use it?
Here is a short sample class:
classdef TestClass
properties
Property1
end
methods
function obj = TestClass(prop1)
obj.Property1 = prop1;
end
end
end
It is located in a file called TestClass.m. When compiling using the default properties to a .NET assembly using TestClass.prj as the project name, TestClass as the class name and TestClass.m as the filename, I get a microsoft compiler error "member names cannot be the same as their enclosing type"
When I change the classname to something that will compile(TestClassContainer), Property1 does not appear. All I see is the Constructor function. Does anybody know if this isn't supported or am I just forgetting something like a get/set function?
Thanks In Advance

답변 (2개)

Chirag Gupta
Chirag Gupta 2011년 4월 12일
  댓글 수: 1
Tim Wang
Tim Wang 2011년 4월 20일
Thanks,
I have read that before and have just went over it again, but it does not seem to address classdefs anywhere. Can you be more specific?

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


Zhizhuang
Zhizhuang 2012년 3월 9일
I am facing the same problem. Do you have the answer now?
  댓글 수: 1
Friedrich
Friedrich 2012년 3월 10일
You cannot compile a classdef only, because MATLAB Objects are not supported as input or output of compiled functions. You can find this in the Builder JA documentation:
http://www.mathworks.de/help/toolbox/javabuilder/ug/brlu1as-2.html

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

카테고리

Help CenterFile Exchange에서 Write C Functions Callable from MATLAB (MEX Files)에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by