How to call member function of class in another m file in matlab?
조회 수: 11 (최근 30일)
이전 댓글 표시
How can call class function,and initialize object of class in another file.m , when calling from command window its work but I wanna call function from m file.
i have folder:@myClassName.
댓글 수: 0
답변 (1개)
Adam
2014년 8월 7일
You should be able to do this just the same in an m-file as on the command line. Simply as
myObj = myClassName( args );
myObj.someFunc( otherArgs );
I haven't used the folder structure for defining a class myself, just all in one file, but I'm not aware of any reason why standard class creation and function calling don't work with the folder structure. Maybe I am missing something in your question?
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Software Development Tools에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!