Remove elements > 0 and < -1 from an array and replace them by 0
6 次查看(过去 30 天)
显示 更早的评论
Hi, I have an array (7x269), as attached. I would like to remove all values (elements) >0 and <-1 and replace them by 0. Thanks
0 个评论
采纳的回答
madhan ravi
2018-11-7
编辑:madhan ravi
2018-11-7
load data.mat
offsetfromPPT(offsetfromPPT<-1 | offsetfromPPT>0)=0
max(max(offsetfromPPT)) %if it is zero
min(min(offsetfromPPT)) %if it is less than -1 then the solution is right
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!