Cell Array manipulation for text data
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
Hi, As part of a college project I must clean a dataset that consists of 10 x 120000 cell array. Each of the rows contain information about an individual who took part in a race, their name, location,time etc. I have successfully retrieved this data from excel and removed all the ‘unknown’ named participants:
[~,~,raw]=xlsread('File Wk1edited_Original.xlsx ');
[Z, ~] = find(cellfun(@(s) isequal(s, 'Unknown'), raw));
I need to assign a user ID to each individual participant which takes into account their location (e.g. the first town would have a code of 10000) and their name (e.g. a code of 1), in alphabetical order. For example, if Aaron Adams competed in Ahane then he would have a user ID of 10001, combining location and name. I also know that some of the participants took part several times so if Aaron Adams where to come up again I would want him to be given the user ID 10001 each time.
I’m really struggling with this and would appreciate the help. If it’s not clear enough please message and I will clarify.
Thanks in advance.
1 comentario
dpb
el 20 de Jun. de 2017
Are you aware of the table data class?
doc unique
will serve to go quite a long ways towards solving your above specific problem. It will undoubtedly take a lot of manual correction to fixup all the typos this will uncover and/or the research into whether the two Bill Jones's are really one and the same one or not.
Respuestas (0)
La pregunta está cerrada.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!