T1 = readtable('Dem1.txt');
T2 = readtable('Dem2.txt');
Glacier_yes = find(T2.(5));
T1 = T1(Glacier_yes,:);
now T1 is a table holding data that corresponds only to entries where glacier variable was 1.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!