I have difficulties while converting the following matlab line into C++:
for i=1:height
for j=1:width
if (match == 0)
[min_w, min_w_index] = min(w(i,j,:));
mean(i,j,min_w_index) = double(data(i,j));
sd(i,j,min_w_index) = sd_init;
end
rank = w(i,j,:)./sd(i,j,:);
rank_ind = [1:1:C];
end
end
Especially I don’t know how to covert the “min_w_index” part. Could someone help me on this point?
Most common solution for min function in such case is
Don’t forget that C++ has zero-based index, but Matlab one-based. I already see problem in your comment.