error + matrix dimension must agree

2 次查看(过去 30 天)
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 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by