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))

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by