Effacer les filtres
Effacer les filtres

Greater number of matrix in a loop

2 vues (au cours des 30 derniers jours)
Ali Jaber
Ali Jaber le 8 Avr 2016
Modifié(e) : Ali Jaber le 24 Avr 2016
I have a loop that test the cosine similarity between test image and the database images (Training Images). I want to choose the greater 5 values of cosTheta and show them in axes

Réponse acceptée

Steven Lord
Steven Lord le 8 Avr 2016
AFTER the loop has finished executing, sort your list of similarity values (using two output arguments) and use the locations where the maximum values are located in the original list to determine the data to read in and display.
  2 commentaires
Ali Jaber
Ali Jaber le 21 Avr 2016
Please Mr.Steven help me, I tried to sort my array "Cosinetheta" but I didn't know how to let the higher 5 values to display in the axes
Steven Lord
Steven Lord le 21 Avr 2016
Example:
z = [1 5 9 2 8 4 3];
[sortedZ, locations] = sort(z, 'descend')
locations(1:2) will be the indices in z of the two largest values, which were stored in sortedZ(1:2). Use that information to determine which files to plot.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by