Invalid syntax for calling function 'db' on the path. CAN SOMEBODY HELP ME WITH THIS ERROR :(
古いコメントを表示

function pushbutton4_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
im = handles.imdata1;
%% Find the class the test image belongs
Ftest=FeatureStatistical(im);
%% Compare with the feature of training image in the database
load 'db.mat'
Ftrain=db(:,1:2);
Ctrain=db(:,3);
for (i=1:size(Ftrain,1))
dist(i,:)=sum(abs(Ftrain(i,:)-Ftest));
end
m=find(dist==min(dist),1);
det_class=Ctrain(m);
if det_class == 1
R1 = 'Japanese Beetles';
set(handles.edit1,'string',R1);
% helpdlg(' Japanese Beetles ');
% disp(' Japanese Beetles ');
elseif det_class == 2
R2 = 'Whitefly';
set(handles.edit1,'string',R2);
% helpdlg(' Whitefly ');
% disp('Whitefly');
elseif det_class == 3
R3 = 'Stink Bug';
set(handles.edit1,'string',R3);
% helpdlg(' Stink Bug ');
% disp(' Stink Bug ');
elseif det_class == 4
R4 = 'Winter Mouth';
set(handles.edit1,'string',R4);
% helpdlg(' Winter Mouth ');
% disp('Winter Mouth');
% end
% Update GUI
end
guidata(hObject,handles);
回答 (1 件)
madhan ravi
2020 年 6 月 27 日
Please use a different name for "db", you're shadowing the inbuilt function db(...)
doc db
5 件のコメント
Muneeb Ullah
2020 年 6 月 27 日
madhan ravi
2020 年 6 月 27 日
Is “dB.mat” in MATLAB’s path?
Muneeb Ullah
2020 年 6 月 27 日
madhan ravi
2020 年 6 月 27 日
Can you share it?
Muneeb Ullah
2020 年 6 月 27 日
カテゴリ
ヘルプ センター および File Exchange で Call Web Services from MATLAB Using HTTP についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!