comparing column vectors finding maxima element wise
Mostrar comentarios más antiguos
From two column vectors, I want to create a new one containing the row-per-row maximum of the two vectors compared.
So e.g. from a=[1 2 3 4 5]' and b=[0 2 2 5 6]' I want to create c=[1 2 3 5 6]'
Is there a single command for this?
I cannot use "max([a b])" because that will give [5 6] :(
David
Respuesta aceptada
Más respuestas (1)
David Toebaert
el 4 de Ag. de 2021
0 votos
Categorías
Más información sobre Interactions, Camera Views, and Lighting 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!