Add 3 to the values of x that are even

 Respuesta aceptada

Friedrich
Friedrich el 11 de Oct. de 2011
Hi,
x(find(mod(x,2) == 0)) = x(find(mod(x,2) == 0)) + 3
or
ind = find(mod(x,2) == 0);
x(ind) = x(ind) + 3;

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Preguntada:

el 11 de Oct. de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by