gusl: (Default)
[personal profile] gusl
Array indices start from 1, which means that to properly avoid fencepost errors, your code ends up looking like this:
for day=1:floor(size(p1,2)/24) %for each day
    daytotal(day) = sum(p(24*(day-1)+1:24*(day-1)+24));
end

Lots of extraneous 1s. (And that's because the data is nice: this code can't handle partial days)

I hear NumPy is a very good substitute.
(will be screened)
(will be screened if not validated)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

February 2020

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags