Didn't find a relevant answer.
Suppose we have an array
R=[1 2 1 2 2 2]';
How to replace "2" with "4" ?
Thank you.

 Respuesta aceptada

michio
michio el 26 de Sept. de 2016
Editada: michio el 26 de Sept. de 2016
R=[1 2 1 2 2 2]';
R(R==2) = 4;

Más respuestas (0)

Productos

Preguntada:

el 26 de Sept. de 2016

Editada:

el 26 de Sept. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by