Hey Mohamed,
It is my understanding that you want to use the brushing tool on the GUI which was plotted using only 2 columns of a matrix(say X). Now you want to save ALL the entries(All columns) in matrix X, corresponding to the exported brushed data.
I.e. you want to select certain entries from column 'Long' and 'Lat' by using the brushing tool on your plot, and further want to extract all the columns from matrix X corresponding to the saved brush entries.
To select data from plots you can use the brush tool. The selected data can then be exported to the workspace. Refer the documentation to know more.
Here's the code snippet to perform further computation
% X is the Inital Matrix || Bdata is the matrix exported through brush selection || C is the Required Matrix
for i = 1:size(X, 1)
if any(X(i, 1:2) == Bdata)
C(end + 1, :) = X(i, :);
end
end