idaynum = floor(daynum);
[umjd, im, iu] = unique(idaynum); % <= how do I get the "iu" in Julia?
% I need an observation "pms" listed per day in a file.
% For performance reasons the parameter is retrieved from the file only once for each of the different integer days
upms = pi*umjd; % <= for illustration only, instead of really retrieving the observed parameter
pms = upms(iu);
% Now "pms" matches "daynum", ie. when daynum=[1.0, 1.5, 1.8, 2.0, 2.2, 3.1], then pms approx. [3.14, 3.14, 3.14, 6.28, 6.28, 9.42]
In Matlab I can do, for example, with "daynum" fractional day numbers:
idaynum = floor(daynum);
[umjd, im, iu] = unique(idaynum); % <= how do I get the "iu" in Julia?
redunant = rand(1:4,10) # [1,3,3,4,3,1,3,3,3,4]
slimmed = unique(redunant) # returns in my case [1,2,3,4]
indexin(slimmed, redunant) # returns [6, 9, 10], which is one of the possibilities