Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Can anyone tell me how to resolve errors in this code?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
clc;
clear ;
close all;
%%
load FA
F1 = Feature;
load NF
F2 = Feature;
xdata = [F1;F2];
group = cell(1,1);
for ii = 1:size(F1,1)
group{ii,1} = 'Fatigue';
end
for ii = 1:size(F2,1)
group{ii+size(F1,1),1} = 'Non-Fatigue';
end
svmStruct = fitcsvm(xdata,group,'showplot',true);
% Testing
save svm svmStruct
load svm
for ii = 1:size(F1,1)
species = ClassificationSVM(svmStruct,F1(ii,:));
disp([ group{ii,1} ' = ' species]);
end
for ii = 1:size(F2,1)
species = ClassificationSVM(svmStruct,F2(ii,:));
disp([ group{ii+size(F1,1),1} ' = ' species]);
end
%%%% I am getting these errors.
%%%% This is a code to train data using svm for template matching.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/334803/image.jpeg)
0 comentarios
Respuestas (1)
Walter Roberson
el 21 de Jul. de 2020
Editada: Walter Roberson
el 31 de Jul. de 2020
2 comentarios
Walter Roberson
el 21 de Jul. de 2020
okay so pass in that option. you probably need to give it the value true
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!