error + matrix dimension must agree

5 visualizaciones (últimos 30 días)
Nik
Nik el 16 de Mzo. de 2014
Editada: Nik el 19 de Mzo. de 2014
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);

Respuesta aceptada

Mischa Kim
Mischa Kim el 16 de Mzo. de 2014
Editada: Mischa Kim el 16 de Mzo. de 2014
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 comentarios
Mischa Kim
Mischa Kim el 18 de Mzo. de 2014
What are the sizes of X and T? Is T a scalar?
Nik
Nik el 19 de Mzo. de 2014
Editada: Nik el 19 de Mzo. de 2014
Sir Mischa, T is:
M=size(pic,1)^2;
T=sig*sqrt(2*log(M));
while X is the wavelet coefficient value. TQVM.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by