bugfix: messed up order

This commit is contained in:
Michael Stumpf (ifhcluster) 2018-12-10 10:41:23 +00:00
parent fa769ec4b4
commit c62cf45452
1 changed files with 4 additions and 2 deletions

View File

@ -12,10 +12,12 @@ function [pp2] = convert_particles_array_colmap(pp1,col1,col2)
nt = size(pp1,3);
pp2 = zeros(ncol2,np,nt);
col2keys = col2.keys;
[colvals,idx] = sort(cell2mat(col2.values));
colkeys = col2.keys;
colkeys = {colkeys{idx}};
for it=1:nt
for icol=1:ncol2
key = col2keys{icol};
key = colkeys{icol};
if col1.isKey(key)
pp2(icol,:,it) = pp1(col1(key),:,it);
end