フィルターのクリア

what bsxfun will perform here?

2 ビュー (過去 30 日間)
Shan Sha
Shan Sha 2018 年 11 月 13 日
コメント済み: Star Strider 2018 年 11 月 13 日
function Ccode = gen_binary_codes(C, K)
U=mean(C,1);
Ccode =zeros(size(C));
Ccode( bsxfun(@gt, C, K*U) )=1;
This is my code. what bsxfun is performing here?

採用された回答

Star Strider
Star Strider 2018 年 11 月 13 日
The bsxfun call calculates a vector of logical elements.
If ‘C’ is greater than ‘K*U’, the output is true, and the expression sets the elements of ‘Ccode’ corresponding to those logical true subscripts equal to 1.
  2 件のコメント
Shan Sha
Shan Sha 2018 年 11 月 13 日
thanks sir
Star Strider
Star Strider 2018 年 11 月 13 日
As always, my pleasure.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by