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 view (last 30 days)
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',';')

Answers (0)

Categories

Find more on Convert Image Type in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!