Replace 'greater than' values in a matrix

31 ビュー (過去 30 日間)
Corey Bullard
Corey Bullard 2012 年 5 月 2 日
コメント済み: ahmed ALmarhabi 2021 年 2 月 27 日
I want to look through a very large matrix and replace numbers that are larger than, say, a, with b.
Is there a simple way or a function to do this?

採用された回答

Andrei Bobrov
Andrei Bobrov 2012 年 5 月 2 日
M - your matrix
M(M > a) = b;

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by