Difficulty foor running a class
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Walter Roberson
am 23 Sep. 2018
I speculate that you did not store the classdef in a separate file named after the class to be created.
Antworten (3)
Arun Mathamkode
am 27 Sep. 2018
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.
0 Kommentare
elias BITAR
am 27 Sep. 2018
Bearbeitet: Walter Roberson
am 27 Sep. 2018
1 Kommentar
Walter Roberson
am 27 Sep. 2018
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
am 30 Sep. 2018
1 Kommentar
Walter Roberson
am 30 Sep. 2018
This new version is not < handle and leads to the editor error that events can only be defined for handle classes.
Siehe auch
Kategorien
Mehr zu Whos finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!