Hello together, I am pretty new to MATLAB since I has been forced to switch. Accordingly I have not many skills that would help me solve my problem wherefore I would appreciate any help!
My Problem: I have a matrix (actually it's an imported CSV-table) of following form:
- column1: contains numbers of days incrementing every 10th value (1,1,1,1,1,1,1,1,1,1,2,2,2,....,40)
- column2: contains names where each name only appears once a day (e.g. "Paul" would appear once on day 1,2,..,40).
- column3: cotains the output
My goal is to create a further column where I can create the cumulative sum of the column containing the output numbers.
On day 1 Paul has Output 5, on day 2 it is an output of 3 and on day 3 it is 4.
So in my newly created cumulative-sum-column (column4) the following should happen in every line:
- If column1 = 1, column2 = Paul, column3 = 5 then column4 = 5
- If column1 = 2, column2 = Paul, column3 = 3 then column4 = 8
- If column1 = 3, column2 = Paul, column3 = 4 then column4 = 12
Is there anybody able to help?
Many thanks in advance!