size() function returns wrong size
古いコメントを表示
i have the following line of code:
s = size(k_distances)
k_distances is a 1x1 matrix:

but the size function returns a size of 1x2:

and then:
k_labels = zeros(s);
returns a 3x1 matrix that not all zeros!!

any idea what is happening?
thank you
4 件のコメント
VBBV
2020 年 11 月 7 日
May be k_distances variable is called inside another loop and its size is varying. Can you show full code ?
John D'Errico
2020 年 11 月 7 日
Please don't post pictures of your code. You can paste in text more easily, and that text can now be copied by those who would try to help you.
danielle sisserman
2020 年 11 月 7 日
danielle sisserman
2020 年 11 月 7 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!