Inserting rows (location specified by ID)

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 Kommentar

Sean de Wolski
Sean de Wolski am 22 Mär. 2011
Can you provide a small example (inputs/operations/expected outputs) please. It'll make it much easier for us to tackle your problem.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Jos (10584)
Jos (10584) am 22 Mär. 2011

0 Stimmen

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:

Kategorien

Mehr zu App Building finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 22 Mär. 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by