How to solve error Error using - ?
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
>> 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 commentaire
KSSV
le 2 Jan 2018
Only you pasted error....how you expect us to know what made you to get the error?
Réponses (1)
Walter Roberson
le 2 Jan 2018
Your data is RGB and so is 3 dimensional, but your code expects it to be 2 dimensional.
0 commentaires
Voir également
Catégories
En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!