How to solve error Error using - ?

조회 수: 1 (최근 30일)
Veizal Rasyid
Veizal Rasyid 2018년 1월 2일
답변: Walter Roberson 2018년 1월 2일
>> uji
Error using -
Matrix dimensions must agree.
Error in fknn (line 81)
distances = (repmat(test(i,:), num_train,1)-data).^2;
Error in classification (line 7)
[y,memberships]=fknn(sampel,training_class, uji,testing_class, K, info);
Error in uji>pushbutton16_Callback (line 219)
classification();
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in uji (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)uji('pushbutton16_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback
  댓글 수: 1
KSSV
KSSV 2018년 1월 2일
Only you pasted error....how you expect us to know what made you to get the error?

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2018년 1월 2일
Your data is RGB and so is 3 dimensional, but your code expects it to be 2 dimensional.

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by