find matching values from two unequal size arrays
62 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have two arrays of unequal length. [lat1 lon1 pCO2] say 200000 values in each column [lat2 lon2] say 100000 values in each column
I want to find where both lat2=lat1 and lon2=lon1, then take the pCO2 value from the first array and plug it into the second array as a new column.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (2)
Andrei Bobrov
am 10 Nov. 2018
Let:
a = [lat1 lon1 pCO2];
b = [lat2 lon2];
b(:,3) = a(ismember(a(:,1:2),b,'rows'),3);
Siehe auch
Kategorien
Mehr zu Interpolation of 2-D Selections in 3-D Grids finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!