Combine identical elements of a matrix to filter informations
1 view (last 30 days)
Show older comments
Hello everybody,
I have a couple of matrices with two columns: a District code and the regarding ZIP codes.
276050166000 41749
276050166000 41751
276050166000 47877
276050170000 46519
276050170000 46535
I would like to create sub matrices where I can group the zip codes to their regarding district codes. As it is a huge dataset, I would like to let it be done automatically (f.e. with a loop!?). Something like if I have the value i=276050166000, 276050168000,... then give me the regarding zip codes. The objective is to filter the zip codes and combine them with another dataset in order to make conclusions about every single district.
I want to have something like this, but that I do not have to calculate every district "by hand":
kreis0966=ismember(RB09(:,1),276050966000);
K0966 = RB09(kreis0966,:);
PLZ0966 = K0966(:,2);
i0966 = ismember(clearedDataInt(:,2),PLZ0966);
Passiva0966 = clearedDataInt(i0966,4);
As I am a beginner in Matlab, I have no idea how to do this and I am thankful for every help :)
0 Comments
Answers (0)
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!