From: Zafer Çoban on
"Steve Amphlett" <Firstname.Lastname(a)Where-I-Work.com> wrote in message <i21cu4$6m6$1(a)fred.mathworks.com>...
> "Zafer Çoban" <zcoban(a)aselsan.com.tr> wrote in message <i20pj9$3gp$1(a)fred.mathworks.com>...
> > Hi,
> > I ran a for loop with 1000 iterations in an .m file. It has been running for 3 days. I wonder if there is a way to learn the iteration number without stopping the run? Thanks...
>
> Take the hit. Kill it. Query your counter variable. If your code is linear with iteration number, you can estimate the mean execution speed and expected total time. If it is not linear with iteration number (more likely), you can at least get a lower estimate for the total time. If the estimate is too big (mega-years), think again about your algorithm. If your estimate is reasonable (you decide what reasonable is), have your loop spit out its counter.
>
> If (and this is common with experimental data), your iterations need not be done in any specific order, consider randomising the order. Or running sweeps with ever increasing resolution across the domain. Save the result periodically so that you can l and view it with another Matlab instance (licensing scheme permitting) or some other application.

No need to kill it, it is over by now. Thanks for the replies...
From: Zafer Çoban on
dpb <none(a)non.net> wrote in message <i21jbo$n63$1(a)news.eternal-september.org>...
> Zafer Çoban wrote:
> > Hi,
> > I ran a for loop with 1000 iterations in an .m file. It has been running
> > for 3 days. I wonder if there is a way to learn the iteration number
> > without stopping the run? Thanks...
>
> Besides the other suggestions I'd wonder what's in those iterations? Is
> it reasonable to think sotoo of several minutes per iteration? I would
> presume you ran one or two iterations during development; did they take
> that long? While possible it is that compute-intensive, I'd wonder if
> you actually built an infinite loop by mistake?
>
> --
Well, in every iteration;
i generate 8 random arrays with 100000 length. Then i modulate these random arrays to 13 different modulations (during modulation these are upsampled by 4). For each generated 13 arrays (with length 400000), calculate 2nd, 4th, 6th and 8th order statistics (total of 14) and that's all.
The run is over now, so it is not an infinite loop. I guess the needed time for this run is acceptable...
First  |  Prev  | 
Pages: 1 2 3
Prev: slow fscanf - serial port
Next: help needed