Difficulty foor running a class
이전 댓글 표시
I copied an example as showed in Matlab examples presentation but I get the following message classdef BasicClass ↑ Error: Illegal use of reserved keyword "classdef". Please can you help to run a class example Regards
댓글 수: 2
Stephan
2018년 9월 23일
Please provide the code you have tried so far.
Walter Roberson
2018년 9월 23일
I speculate that you did not store the classdef in a separate file named after the class to be created.
답변 (3개)
Arun Mathamkode
2018년 9월 27일
0 개 추천
As Walter Roberson pointed out, please make sure that you store the classdef in a separate file with the same name as the class name. Also please make sure that you didn't miss any end statements while copying the sample code.
elias BITAR
2018년 9월 27일
편집: Walter Roberson
2018년 9월 27일
댓글 수: 1
Walter Roberson
2018년 9월 27일
When I store the noted code in MyClass.m then I do not encounter any error in R2018a or R2018b.
Could you attach a copy of the MyClass.m that you are having difficulty with? Not paste but attach: I want to check it for special characters.
elias BITAR
2018년 9월 30일
0 개 추천
댓글 수: 1
Walter Roberson
2018년 9월 30일
This new version is not < handle and leads to the editor error that events can only be defined for handle classes.
카테고리
도움말 센터 및 File Exchange에서 Class Introspection and Metadata에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!