フィルターのクリア

Undefined function or variable

1 回表示 (過去 30 日間)
danielle sisserman
danielle sisserman 2020 年 11 月 7 日
コメント済み: danielle sisserman 2020 年 11 月 7 日
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

採用された回答

John D'Errico
John D'Errico 2020 年 11 月 7 日
編集済み: John D'Errico 2020 年 11 月 7 日
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.
  1 件のコメント
danielle sisserman
danielle sisserman 2020 年 11 月 7 日
thank you.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by