I have a variable GT2, which is a 1x900 double.
I am trying to do a cumulative sum, where for each cell it does a cumulative sum up to that point, dives this by how many numbers has been summed, and then take the square root.
The current code I have for this is below. When I run this code, it creates a 900x900 double. All I want it to do is do that calculation for each cell so I end up with the same number of values (900) as in GT2. Can anybody help?
flucc = sqrt(cumsum(GT2)./time);