0
$\begingroup$

For the sake of demonstration in a class I wanted to use the line:

Histogram[Accumulate[RandomReal[{-1, 1}, 100000]], {1}, "Probability"]

to get a probability-like distribution of the random walk process. This worked for me on Mma7, 8, and 9 returning a reasonable probability-like histogram. As soon as I do it now (Mma 10.0.2, Win7) I get for several times the desired histogram. However, after several (about 10) trials I suddenly see the word "Histogram" appearing in red color, and the whole thing stops working, with a message that Histogram is obsolete. So, (i) what happened? and (ii) Could I repair it?

$\endgroup$
5
  • $\begingroup$ Hmmm, no problems on a MacBook with Mathematica 10.0.2, code seems to work as it should... $\endgroup$
    – mgamer
    Commented Mar 1, 2015 at 20:05
  • $\begingroup$ Same on Mathematica 10.0.0 Windows 8, no errors. Can you reproduce it just by running only that input line a couple of times in a fresh kernel? $\endgroup$ Commented Mar 1, 2015 at 20:24
  • $\begingroup$ Couldn't reproduce it with Mma 10.0.2 and Win7. $\endgroup$
    – Karsten7
    Commented Mar 1, 2015 at 23:55
  • 2
    $\begingroup$ I'm curious whether you can still reproduce this Alexei? I can get an error out of your command (MMA 10.2, Linux) but not after 10 trials, after a hundred or more, and my error is different as well. The error message is here $\endgroup$
    – Jason B.
    Commented Oct 14, 2015 at 11:57
  • $\begingroup$ @Jason B I tried with Mma10.2 several possibilities, such as plain line given above, Table[...,{200}] and Do[...,{i,200}], where inside the operators there always was the above Histogram statement. No problem now. At least I did not notice with 200 repetitions. $\endgroup$ Commented Oct 19, 2015 at 7:45

1 Answer 1

1
$\begingroup$

For Mathematica 10.2.0.0 there is no problem:

enter image description here

$\endgroup$

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.