Inserting rows (location specified by ID)
Mostrar comentarios más antiguos
Hi there. I'm very novice when it comes to code writing and need help. I'll try to simplify the problem. I have a large dataset with columns (A:E)and rows (1:1000). The rows 'belong' to approx 600 IDs (column A). I need to move column B 'into' column E so that: - a new row (or rows) is inserted under each ID (some ID have multiple rows) - data in column B for each ID is copied to the new row under column E. - data in the other columns for each ID are copied to the new row(s)
Is this doable in MATLAB? I'm using R2008B. Thank you for your help.
1 comentario
Sean de Wolski
el 22 de Mzo. de 2011
Can you provide a small example (inputs/operations/expected outputs) please. It'll make it much easier for us to tackle your problem.
Respuestas (1)
Jos (10584)
el 22 de Mzo. de 2011
0 votos
Take a look at insertrows that ... well ... insert rows at locations specified by row indices.
The problem than becomes how to get row indices from your ID's. That could be trivial, but, as Sean de already pointed out,provide us with a small (small!) example of input, operations and expected output, so that repliers can be of more help.
Anyhow, here is the link to insertrows on the Fex:
Categorías
Más información sobre App Building en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!