matrix if statement is above .5 then can I re enter it to show .5
Mostrar comentarios más antiguos
I have a large matrix(x) and I want to change any value the is above .5 or below -.5 to .5 or -.5 respectively in a certain column(2). any assistance regarding this topic would be greatly appreciated.
regards, cormac
Respuesta aceptada
Más respuestas (1)
Thorsten
el 27 de Abr. de 2015
R = randn(10)/3;
R(R > 0.5) = 0.5;
R(R < -0.5) = -0.5;
Categorías
Más información sobre Matrix Indexing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!