Message Boards Message Boards

0
|
11822 Views
|
6 Replies
|
1 Total Likes
View groups...
Share
Share this post:

How to evaluate the whole notebook ?

Posted 11 years ago
How to run/execute a .nb file? I could not find the answer in the Mathematica documentation. Also, I had to choose a random group because I could not find a fitting group for the question and the web page would not allow me to post a question without choosing a group. 
6 Replies
On a OS X, I run Mathematica from the the X11 command line by typing the following command, where mma_simple.txt is the desired nb saved as text format. The last line of the notebook (or manually modified txt file) should be " Exit[ ] ", so that the x11 prompt can return from calling Mathematica. Hope this helps.

x11_prompt>> ../../Applications/Mathematica.app/Contents/MacOS/MathKernel -run "<< /Users/iabraham/Desktop/mma_simple.txt"

I got the above idea (and variations)  from the guidance at http://pages.uoregon.edu/noeckel/Mathematica.html
POSTED BY: Isaac Abraham
.nb files are documents and are open with help of Mathematica. Like for example a .txt file is open with a text editor. Once you open a .nb file you can run code inside it, because it also serves a interactive programming environment.
POSTED BY: Sam Carrettie
Hi Issac, tnx for your response
Hi Sam, thanks for the response. I understand that part. But what I do not understand is that how to run an entire .nb file. For eg., I downloaded the file GameofLife.nb. I could run individual commands doing shift+enter within a square bracket. I was not sure how to run the entire file. But I later figured out that there are bigger square brackets enclosing the smaller square brackets, and if skillfully manage to move the mouse pointer to select the square bracket higest in the hierarchy I am able to run the entire code. 

Is there a simple way of doing this? Why is there not a simple 'run/execute' button?
Yes: Top menu >> Evaluation >> Evaluate Notebook
POSTED BY: Sam Carrettie
thanks. that helps. 
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract