Parallel and distributed systems exercise 2: ditributed all-kNN algorithm.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- function [M, I] = maxIdx(Vec)
- %maxIdx Calculate the max,index pair of each element of a vector
- %
- n = length(Vec);
- I = 0;
- M = -Inf;
- for j = 1:n
- if M < Vec(j)
- M = Vec(j);
- I = j;
- end
- end
- end
|