User Tools

Site Tools


gibson:teaching:fall-2016:math753:notebook-workflow

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
gibson:teaching:fall-2016:math753:notebook-workflow [2016/09/01 09:59]
gibson
gibson:teaching:fall-2016:math753:notebook-workflow [2016/09/01 10:21]
gibson
Line 5: Line 5:
   - Live Julia code   - Live Julia code
   - Graphical output   - Graphical output
- 
-====== Executing Julia code in a notebook ===== 
  
 Our first concern is working with the live Julia code cells. I'll illustrate on the "​Numbers,​ variables, and basic functions"​ notebook from the Hands-on Julia tutorial. You should start that notebook and follow along (see [[:​gibson:​teaching:​fall-2016:​math753:​julia-notebooks]]). ​ Our first concern is working with the live Julia code cells. I'll illustrate on the "​Numbers,​ variables, and basic functions"​ notebook from the Hands-on Julia tutorial. You should start that notebook and follow along (see [[:​gibson:​teaching:​fall-2016:​math753:​julia-notebooks]]). ​
  
-Julia uses a number of keyboard shortcuts ​+-----
  
 ===== Executing a line of code with shift-enter ===== ===== Executing a line of code with shift-enter =====
Line 24: Line 22:
 {{ :​gibson:​teaching:​fall-2016:​math753:​notebookworkflow2.jpg |}} {{ :​gibson:​teaching:​fall-2016:​math753:​notebookworkflow2.jpg |}}
  
 +-----
 ===== Adding a new Julia-code cell with ctrl-m-b ===== ===== Adding a new Julia-code cell with ctrl-m-b =====
  
-The notebook has asked you to try a few calculations even before the ''​typeof(10)''​ statement. To do this, click on the section of text starting ''​[1] Type different types of integers ...''​ and then either select Insert -> Insert Cell Below from the menu, or use the quicker keyboard shortcut "​control-m b" (or "​ctrl-m b"). That is, hold the control key, type ''​m''​, and then let go and type "​b"​. This will insert an empty Julia-code cell, which you can type Julia commands into and execute with shift-enter.+The notebook has asked you to try a few calculations even before the ''​typeof(10)''​ statement. To do this, click on the section of text starting ''​[1] Type different types of integers ...''​ and then either select Insert -> Insert Cell Below from the menu, or use the quicker keyboard shortcut "​control-m b" (or "​ctrl-m b"). That is, hold the control key, type "m", and then let go of control ​and type "​b"​. This will insert an empty Julia-code cell, which you can type Julia commands into and execute with shift-enter. After entering the suggested ''​3/​4''​ and hitting shift-enter,​ you'll see 
 + 
 +{{ :​gibson:​teaching:​fall-2016:​math753:​julia-notebooks:​notebookworkflow3.jpg |}} 
 + 
 +---- 
 + 
 +===== Execute and add new cell with alt-enter ===== 
 + 
 +When you want to execute a bunch of commands, it can get tedious to keep opening new cells. The "​alt-enter"​ shortcut executes the current cell then immediately starts a new cell below. I've used "​alt-enter"​ to compute a few powers of 10 as the notebook suggests.
  
-===== +{{ :​gibson:​teaching:​fall-2016:​math753:​julia-notebooks:​notebookworkflow4.jpg |}}
gibson/teaching/fall-2016/math753/notebook-workflow.txt · Last modified: 2016/09/02 06:24 by gibson