how to select the top 5 five values in a matrix
37 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
jaah navi
el 28 de Mzo. de 2019
Editada: madhan ravi
el 28 de Mzo. de 2019
If A=rand(5,15) whch generates 5 rows with 15 columns
Could anyone help me how to select the highest 5 values in A.
0 comentarios
Respuesta aceptada
madhan ravi
el 28 de Mzo. de 2019
Editada: madhan ravi
el 28 de Mzo. de 2019
maxk(A(:),5) % gives the max 5 values of entire matrix
%or
max(A,[],2) % gives max of each row (finally resulting with 5 values)
Más respuestas (0)
Ver también
Categorías
Más información sobre Descriptive Statistics en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!