TideMan <email@example.com> wrote in message <348a0afd-3e60-4417-864d- > So, you're doing the equivalent of taking daily means (if the t were Matlab days). > Why is that dumb?
Don't know why it's dumb, it's just that it doesn't seem to be the best way. I would think there are some built-in matlab functions that I ignore. More ore less it's taking daily means. But it's an operation also extremely common in imaging situations. Suppose I want to simulate a digital camera with resolution 1000x1000. How would I do that? I compute with an higher resolution (say 4'000x4'000) what arrives on the detector, some kind of noise and distorsions etc... And then to go down to the actual resolution I do not subsample my original vector (1:4:4000), I average everything that has fallen within each pixel! And this "integral subsampling" (if it's the correct name) it's what happens in a lot of the more diverse situations. (i.e. sensors measuring radioactivity counts dinamically etc...)
> The only thing I'd criticise about your method is the use of i as an index. By default i and j are sqrt(-1). This may seem trivial, but one day this will jump up and bite you. Use something else, like it or jt, for the index.