"Matrix dimensions must agree" getting error
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
feat_indic=feat_indic|(feat_ranking_groups2==lld_groups);
feat_indic 1x6373
feat_ranking_groups2 65x1
lld_groups 6373x1
1 件のコメント
Walter Roberson
2019 年 5 月 9 日
What size of results are you expecting from the == between two matrices of different sizes?
回答 (2 件)
KSSV
2019 年 5 月 9 日
Read about ismember
idx = ismember(lld_groups,feat_ranking_groups2) ;
feat_indic=feat_indic|(idx);
0 件のコメント
Walter Roberson
2019 年 5 月 9 日
feat_indic = feat_indic | ismember(lld_groups.', feat_ranking_groups2);
The .' is there to compensate for the fact that your indic is a row vector but your groups is a column vector.
0 件のコメント
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!