While calling a function inside a for loop I need to store all return values into a column matrix nx1 if n is number of times loop iterates:
for (i = 1:n)
function(arg);
end
After storing these values I need to get top five values as well.