How to use logical indexing to change certain values in matrix

21 visualizzazioni (ultimi 30 giorni)
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

Risposte (1)

dpb
dpb il 25 Nov 2015
x(x==112)=225;

Community Treasure Hunt

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

Start Hunting!

Translated by