यह @ ragfield का जवाब करने के लिए सिर्फ एक विस्तार है। आप presententations के लिए एक एनिमेटेड GIF और जैसे प्रगति संकेतक सहेजना चाहते हैं
Clear["Global`*"];
count = 0; inRange = 0; i = 0; sumTgt = 10^5
Monitor[
While[count < sumTgt,
If[.14 < (rand = RandomReal[]) < .15, inRange++];
count += rand;
]
, {{"SumTillNow", ProgressIndicator[count, {0, sumTgt} ],count},
{"InRange", ProgressIndicator[inRange, Indeterminate],inRange}}
// MatrixForm
];
, आप संशोधित कर सकते हैं:
आप घिरा है और असीम परिमाण का प्रतिनिधित्व करना चाहते हैं, तो आप कुछ इन पंक्तियों के साथ कर colud यह थोड़ा:
count = 0; inRange = 0; i = 0; sumTgt = 10^4
Monitor[
While[count < sumTgt,
If[.14 < (rand = RandomReal[]) < .15, inRange++];
count += rand;
]
, a[++i] = Grid[
{{"SumTillNow", ProgressIndicator[count, {0, sumTgt}],count},
{"InRange", ProgressIndicator[inRange, Indeterminate],inRange + 0.}},
Frame -> All, Alignment -> {{Left, Center, Right}},
ItemSize -> {{Automatic, Automatic, 8}}];
];
Export["c:\Anim.gif", Table[a[j]//MatrixForm, {j, i}],"DisplayDurations"->{.3}]
और परिणाम है:
धन्यवाद, मैंने पहले ही किया है। – pAkY88