Hello,
I have the following problem in Matlab: Consider dataset a, with the following two columns:
0 / 0
0 / 0
1 / 0
1 / 0
1 / 9
0 / 0
-1 / 0
-1 / 4
0 / 0
My problem is that the value 9 has to be spread equally during the time that column 1 is equal to 1. The same has to be done with the value 4 during the time that column 1 is equal to -1. The result I have to obtain is the following:
0 / 0
0 / 0
1 / 3
1 / 3
1 / 3
0 / 0
-1 / 2
-1 / 2
0 / 0
Thanks,
Pieter
Best Answer