abstract class with inherite handle class

1 view (last 30 days)
Muhammad Khalid
Muhammad Khalid on 11 Aug 2019
Commented: Matt J on 14 Aug 2019
hi,
i use this code to access file of abstract class with inherited handle class I use this code .....
classdef(Abstract) featureGenerationUnit< handles
properties
EEG;
features;
names;
INFO;
status;
end
methods
function obj = featureGenerationUnit(EEG, INFO)
obj.EEG = EEG;
obj.INFO = INFO;
end
function loadData(EEG)
obj.EEG = EGG;
end
function loadInfo(INFO)
obj.INFO = INFO;
end
end
methods(Abstract)
getFeatures(obj)
end
end
i use these command to make obj but it gives error
mc = ?MyClass;
>> mc = meta.class.fromName('featureGenerationUnit');
>> fGU = featureGenerationUnit;
Not enough input arguments.
Error in featureGenerationUnit (line 12)
obj.EEG = EEG;
other error is
fGU = featureGenerationUnit;
Error using featureGenerationUnit
The specified superclass 'handles' contains a parse error, cannot
be found on MATLAB's search path, or is shadowed by another file
with the same name.
  2 Comments
Steven Lord
Steven Lord on 11 Aug 2019
FYI for others answering this question, I believe this other question is related.
Matt J
Matt J on 14 Aug 2019
Muhammad's comment moved here:
I use a code for preprocessing and feature Extraction and I have no code for support vector machine but i have other code which has feature is preprocessing , feature extraction and svm which is based on EEGLAB .Can I use a Code which is based on only for support vector machine without EEGLAB ?

Sign in to comment.

Answers (1)

Matt J
Matt J on 11 Aug 2019
You cannot create an instance of an abstract class. Also, your constructor expects arguments EEG and INFO, which you have not provided.

Categories

Find more on EEG/MEG/ECoG in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!