How to use logical indexing to change certain values in matrix

9 ビュー (過去 30 日間)
Sam Grassie
Sam Grassie 2015 年 11 月 24 日
回答済み: dpb 2015 年 11 月 25 日
I am trying to use logical indexing to change all elements=112 in a matrix into 225. How do I write a code for this. Any help hugely appreciated thanks in advance

回答 (1 件)

dpb
dpb 2015 年 11 月 25 日
x(x==112)=225;

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by