Replacing all values lower than 1 by 0.

3 visualizaciones (últimos 30 días)
PaoloPa
PaoloPa el 10 de Feb. de 2014
Respondida: PaoloPa el 10 de Feb. de 2014
Hi there! I have a matrix A = 495*2973 where I should replace all the values which are <= 1 with 0.
May you know a quick way to do that? Or will I be obliged to make a loop?
Thanks a lot
P.

Respuesta aceptada

Arkadiusz
Arkadiusz el 10 de Feb. de 2014
A(A<=1)=0
  1 comentario
Jan
Jan el 10 de Feb. de 2014
Isn't this nice? I've struggeled the morning with a Windows batch scripts and now I deeply appreciat this kind of clean and clear Matlab codes.

Iniciar sesión para comentar.

Más respuestas (1)

PaoloPa
PaoloPa el 10 de Feb. de 2014
Great. I was working on a multiple sheet excel file and somehow didn't worked. Now I created two different files and it does work.
I am sorry being so low, but...
Thanks mate

Categorías

Más información sobre Characters and Strings 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