필터 지우기
필터 지우기

Greater number of matrix in a loop

조회 수: 1 (최근 30일)
Ali Jaber
Ali Jaber 2016년 4월 8일
편집: Ali Jaber 2016년 4월 24일
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

채택된 답변

Steven Lord
Steven Lord 2016년 4월 8일
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
Ali Jaber
Ali Jaber 2016년 4월 21일
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 2016년 4월 21일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by