Dear all,
I have four vectors, two with peak values and two vectors with associated location values based on two peak analysis.
loc1=[10.4 15.8 29.2 32.1 35.9];loc2=[10.1 15.2 35.6];pks1=[10 1 5 4 100];pks2=[8 5 1000];
I want create a new vector with the maximum value from vector pks1 and from pks2 when loc1 and loc2 have the approximately same value (~+-2).
I.e. loc1 and loc2 cross at position 1,2 and 5 (10.1 and 10.4, 15.2 and 15.8, 35.6 and 35.9), so my new vector will be: final=[10 5 5 4 1000].
Can anyone help me out?
Thanks in advance!
Best Answer