Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Can anyone tell me how to resolve errors in this code?

1 回表示 (過去 30 日間)
anand rathod
anand rathod 2020 年 7 月 21 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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.

回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 7 月 21 日
編集済み: Walter Roberson 2020 年 7 月 31 日
  2 件のコメント
anand rathod
anand rathod 2020 年 7 月 21 日
It is still showing the same error. How can i change it?
Walter Roberson
Walter Roberson 2020 年 7 月 21 日
okay so pass in that option. you probably need to give it the value true

Community Treasure Hunt

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

Start Hunting!

Translated by