how to replace value of matrix elements
1 次查看(过去 30 天)
显示 更早的评论
I would like to change the value of some elements of a matrix following a specific rule. I particular if a value is greater than a threshold i want to assign a value 1. If tried with this code but doesn't work. A is the matrix
if A(:,:) > Threshold A(:,:)=1 end
suggestions?
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!