Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Progress Meter

  • To: mathgroup at smc.vnet.net
  • Subject: [mg25338] Progress Meter
  • From: "Ersek, Ted R" <ErsekTR at navair.navy.mil>
  • Date: Sat, 23 Sep 2000 03:36:03 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Roberto Brambilla wanted to know how he could see get a nice indication of
how a program is making progress.
Theodore Gray (of Wolfram Research) showed how this can be done very nicely
in Volume 7, Issue 3 of  The Mathematica Journal.  Using T. Gray's solution
you first evaluate the line below.  
---------------

ShowStatus[status_] := LinkWrite[$ParentLink, 
   SetNotebookStatusLine[FrontEnd`EvaluationNotebook[], ToString[status] ]
]

-----

Now suppose  i=8 and j=12.  Evaluating the next two lines will cause "i=8,
j=12" to show in the lower left portion of the Mathematica Window.  Well
that's provided the notebook you are using has a setting for the
WindoeElements option to show the "StatusArea" which is done the default
Style Sheet does.


i=8;j=12;
progress=StringJoin[ "i=", ToString[i], ", j=", ToString[j] ];
ShowStatus[progress]

-----------

What Roberto Brambilla was doing is evaluating a Print statement over and
over. After the program ran he had a lot of Print statements to manually
delete. Evaluating the code below will delete all cells in the input
notebook that were 
generated by Print statements.

nb=InputNotebook[];
NotebookFind[nb, "Print", All, CellStyle];
NotebookDelete[nb]

--------------------
Regards,
Ted Ersek

Down Load Mathematica tips, tricks from
http://www.verbeia.com/mathematica/tips/Tricks.html




  • Prev by Date: filtering data
  • Next by Date: RE: matrix indices
  • Previous by thread: Re: filtering data
  • Next by thread: Optimizing a simple sampling function for speed