I want to write a mean value at certain points in time in a vector.
My simulation is running for a year and I want to calculate a mean value for every day.
I have a variable in what is written what day of the year it is: Real DoY;
For every second my simulation computes a value: Real value;
So now i want something like this:
for i:365 loop
while i==DoY loop
der(value_DoY_dummy) = value;
value_DoY[i] = value_DoY/(34*3600);
end for;
end while;
Of course, this is not working and I don't have any better idea. How can I achieve this?