5
$\begingroup$

I am currently trying to get a numerical simulation running where one variable is iterated over many orders of magnitude. As the calculation takes pretty long, I would like to display a ProgressIndicator for the evaluation, preferreably for the logarithm of the above variable. Trying this, I encountered the following error:

The specified setting for the option FEFloatIterator cannot be used.

Playing around a bit, I found this minimal example that reproduces the error

Monitor[
  For[x = 1, x < 10, ++x, Pause[1]],
  ProgressIndicator[Log[x], {Log[1], Log[10]}]
]

The option FEFloatIterator seems to be undocumented, so I don't know what to do with this error message. The problem seems to originate from the logarithms, but further then that I have no idea.

$\endgroup$
2
  • 1
    $\begingroup$ This seems like a borderline bug to me. You might report it to WRI. $\endgroup$
    – Michael E2
    Nov 25, 2014 at 12:54
  • $\begingroup$ I just got the same error for a Slider where I had the range as {-Pi, Pi}. This was solved by writing N[{-Pi, Pi}]. Version 10.0.2 $\endgroup$
    – Hugh
    Jun 27, 2015 at 15:37

1 Answer 1

4
$\begingroup$

It seems ProgressIndicator can't interpret irrational numbers (I guess because they can be evaluated with any accuracy, while indicator needs some precise number). So just use floats explicitly:

Monitor[
  For[x = 1., x < 10, ++x, Pause[.1]], 
  ProgressIndicator[Log[x], {Log[1], Log[10.]}]]

or

Monitor[
  For[x = 1, x < 10, ++x, Pause[.1]], 
  ProgressIndicator[Log[N@x], {Log[1], Log[N@10]}]]
$\endgroup$
1
  • $\begingroup$ Thanks a lot, this perfectly fixed my problem. $\endgroup$ Dec 25, 2014 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.