actually i have problem with classification EEG this is a last step in my program i am getting errors

function varargout = classification(varargin)
varargout{1} = handles.output;
function pushbutton1_Callback(hObject, eventdata, handles)
load trainfea;
load testfea;
load truelabel
target=truelabel;
groups = ismember(target,'0');
SVMStruct = fitcssvm(trainfea(1:20,:),target(1,1:20),'showplot',true);
classes = ClassificationSVM(SVMStruct,trainfea(:,:),'showplot',true)
class=ClassificationSVM(SVMStruct,testfea);
if class==1
load emotiontrainfea;
load emolabel;
T = emotiontrainfea;
tst=testfea;
[itr] = multisvm( T,emolabel',tst);
if (itr==1)
msgbox('Fear');
end
if (itr==2)
msgbox('Anger');
end
if (itr==3)
msgbox('calm');
end
if (itr==4)
msgbox('Happy');
end
if (itr==5)
msgbox('Sad');
end
end
if class==0
msgbox('Stress');
end
cp=classperf(target',classes);
a=cp.CorrectRate;
b=cp.sensitivity
c=cp.specificity
a(1,1)=a*100;
b=b*100;
c=c*100;
set(handles.edit1,'string',a);
set(handles.edit2,'string',b);
set(handles.edit3,'string',c);
function edit1_Callback(hObject, eventdata, handles)
function edit1_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit2_Callback(hObject, eventdata, handles)
function edit2_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit3_Callback(hObject, eventdata, handles)
hObject handle to edit3 (see GCBO)
eventdata reserved - to be defined in a future version of MATLAB
handles structure with handles and user data (see GUIDATA)
function edit3_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

Answers (0)

Categories

Tags

Asked:

on 24 Apr 2021

Edited:

on 24 Apr 2021

Community Treasure Hunt

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

Start Hunting!