covariance calculation of a square matrix of any size

2 ビュー (過去 30 日間)
x
x 2011 年 9 月 3 日
コメント済み: Hemal 2013 年 10 月 30 日
if cov command is directly aplied to a cameraman image for 3 by 3 matrix .the o/p is not obtained ???
156 159 158
160 154 157
156 159 158
Error using ==> bsxfun Mixed integer class inputs are not supported.
Error in ==> cov at 93 xc = bsxfun(@minus,x,sum(x,1)/m); % Remove mean
Error in ==> Untitled at 12 d=cov(g);
what will be the reason

回答 (1 件)

Walter Roberson
Walter Roberson 2011 年 9 月 3 日
cov() only works on floating point inputs. Use cov(double(g))
  1 件のコメント
Hemal
Hemal 2013 年 10 月 30 日
thanks i also use this

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by