error + matrix dimension must agree

조회 수: 4 (최근 30일)
Nik
Nik 2014년 3월 16일
편집: Nik 2014년 3월 19일
I got error -- Error using + Matrix dimensions must agree.
on this code. Please help me
a=sign(X(ind1)).*(abs(X(ind1))-T);
b=abs(X);
c=plus(a,b);

채택된 답변

Mischa Kim
Mischa Kim 2014년 3월 16일
편집: Mischa Kim 2014년 3월 16일
Nik, X and T need to be same-sized vectors unless T is a scalar.
What are you trying to do in
a = sign(X(ind1)).*(abs(X(ind1))-T);
especially w.r.t. T?
  댓글 수: 3
Mischa Kim
Mischa Kim 2014년 3월 18일
What are the sizes of X and T? Is T a scalar?
Nik
Nik 2014년 3월 19일
편집: Nik 2014년 3월 19일
Sir Mischa, T is:
M=size(pic,1)^2;
T=sig*sqrt(2*log(M));
while X is the wavelet coefficient value. TQVM.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by