i want to check every row that which variable has higest probality ,with indix # of highest prob and arrange it descending order wtih orginal indices and convert it to text which tel me that e.g index 4 has high prob separated by ;
조회 수: 1 (최근 30일)
이전 댓글 표시
clc
x=[A B];
value=0; index=0;
for k=1:5000;
[v in]=max(x(k,:));
value=[value v];
index=[index in];
end
value=value(:,2:end);
index=index(:,2:end);
%% Finding which index has maximum no of values
ma=find(index==1);
mb=find(index==2);
% s0 "ma" has maximum values = 3573
%% Sorting
[Sort_val val_Ind]=sort(value,'descend');
org_ind=0;
for k=1:5000;
sorted_indices=index(val_Ind(k));
org_ind=[org_ind sorted_indices];
end
org_ind=org_ind(:,2:end);
% dlmwrite('val_Ind.dat',val_Ind,'delimiter',';')
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Entering Commands에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!