Array loop to find highest value
Mostrar comentarios más antiguos
I have an array filled with random values between 0 and 1. These values are a result of an earlier image proces. I want to know which 5 images got the best result, but since the values are linked with the id in the array, I can't sort them descending because I could not find what image belongs to what value.
So I got the idea of creating the same array, but finding the highest value with a loop, the id is linked with it so I can call the name of the image and show the image. After that, I can overwrite this value with 0 to run the same loop again and get the new highest value (2nd highest overall) until I got the 5 highest values.
Unfortunately I have no clue on how to write this in matlab even tho I think this is a good approach. Any help by chance?
2 comentarios
Show us the actual data storage by which :the values are linked with the id in the array, :
A first ototh idea would be to save the results by plane instead of mixing them up together...or a place where cell array might be useful segregating device.
Highscore
el 17 de Mayo de 2020
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Matrices and Arrays en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
