Undefined function or variable
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
danielle sisserman
le 7 Nov 2020
Commenté : danielle sisserman
le 7 Nov 2020
I am getting the following error:
this is the function call:
k_distances,k_indices = findKNN(classifier,Xtest(i:1,:));
and this is the first line of the function definition:
function [k_distances,k_indices] = findKNN(classifier,x_test)
can anybody see what I did wrong here?
Thank you
0 commentaires
Réponse acceptée
John D'Errico
le 7 Nov 2020
Modifié(e) : John D'Errico
le 7 Nov 2020
When you want to return results from a function, if there are more then ONE output, use square brackets.
[k_distances,k_indices] = findKNN(classifier,Xtest(i:1,:));
Just like the function header.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Multidimensional Arrays 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!