Hi all, I want to merge two D arrays according a given order.
Suppose I have two arrays id1=[ 3 5 6] and id2=[1 4 7] and coordinates of these ids id1_coords=[23 45;34 66;34 24] and [26 34;46 78; 34 67]
Now, if I sort and merge id1 and id2 as merge_id= union(id1,id2); merge_id=[1 3 4 5 6 7]; So how could i merge id1_coords and id2_coords such that they are arranged in the same sequence as it is in merge_id i.e.
merge_coords will be like..[26 34; 23 45;46 78…..] soon.
Best Answer