Replacing all values lower than 1 by 0.

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

采纳的回答

Arkadiusz
Arkadiusz 2014-2-10
A(A<=1)=0
  1 个评论
Jan
Jan 2014-2-10
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.

请先登录,再进行评论。

更多回答(1 个)

PaoloPa
PaoloPa 2014-2-10
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

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by