abstract class with inherite handle class

1 回表示 (過去 30 日間)
Muhammad Khalid
Muhammad Khalid 2019 年 8 月 11 日
コメント済み: Matt J 2019 年 8 月 14 日
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 件のコメント
Steven Lord
Steven Lord 2019 年 8 月 11 日
FYI for others answering this question, I believe this other question is related.
Matt J
Matt J 2019 年 8 月 14 日
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 ?

サインインしてコメントする。

回答 (1 件)

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

カテゴリ

Help Center および File ExchangeEEG/MEG/ECoG についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by