heading

subtitle

this is just text $c = \sqrt{a^2+b^2}$. on its own line: $$ E=mc^2 $$ you can also do lists:

Tables Are Cool
col 3 is right-aligned \$1600
col 2 is centered \$12
zebra stripes are neat \$1
In [3]:
#=
this is a comment
that spans multiple lines
=#
x=2+3
y=1+1;

println("the answer is: ", x+y)
the answer is: 7
In [4]:
2π
Out[4]:
6.283185307179586
In [5]:
🐢 = 5
Out[5]:
5
In [6]:
🐢^2
Out[6]:
25
In [7]:
x = [1 2 3]
Out[7]:
1×3 Array{Int64,2}:
 1  2  3
In [8]:
y = [1, 2, 3]
Out[8]:
3-element Array{Int64,1}:
 1
 2
 3
In [13]:
A = [1 2 3; 4 5 6]
Out[13]:
2×3 Array{Int64,2}:
 1  2  3
 4  5  6
In [84]:
A = []
Out[84]:
0-element Array{Any,1}
In [85]:
push!(A, "hello")
Out[85]:
1-element Array{Any,1}:
 "hello"
In [86]:
push!(A, rand(2,3))
Out[86]:
2-element Array{Any,1}:
 "hello"                                                 
 [0.795162 0.338256 0.729517; 0.263179 0.822404 0.507274]
In [87]:
push!(A, A)
Out[87]:
3-element Array{Any,1}:
 "hello"                                                                                                  
 [0.795162 0.338256 0.729517; 0.263179 0.822404 0.507274]                                                 
 Any["hello", [0.795162 0.338256 0.729517; 0.263179 0.822404 0.507274], Any[#= circular reference @-1 =#]]
In [88]:
x = rand(5)
Out[88]:
5-element Array{Float64,1}:
 0.624182
 0.42514 
 0.703856
 0.591444
 0.148972
In [89]:
sort!(x)
Out[89]:
5-element Array{Float64,1}:
 0.148972
 0.42514 
 0.591444
 0.624182
 0.703856
In [90]:
x
Out[90]:
5-element Array{Float64,1}:
 0.148972
 0.42514 
 0.591444
 0.624182
 0.703856
In [41]:
y = x
Out[41]:
5-element Array{Float64,1}:
 0.309248
 0.351407
 0.472381
 0.506109
 0.634877
In [42]:
y
Out[42]:
5-element Array{Float64,1}:
 0.309248
 0.351407
 0.472381
 0.506109
 0.634877
In [43]:
x[1] = 2
Out[43]:
2
In [44]:
x
Out[44]:
5-element Array{Float64,1}:
 2.0     
 0.351407
 0.472381
 0.506109
 0.634877
In [45]:
y
Out[45]:
5-element Array{Float64,1}:
 2.0     
 0.351407
 0.472381
 0.506109
 0.634877
In [46]:
z = copy(x)
Out[46]:
5-element Array{Float64,1}:
 2.0     
 0.351407
 0.472381
 0.506109
 0.634877
In [47]:
x[2] = 6
Out[47]:
6
In [48]:
x
Out[48]:
5-element Array{Float64,1}:
 2.0     
 6.0     
 0.472381
 0.506109
 0.634877
In [49]:
y
Out[49]:
5-element Array{Float64,1}:
 2.0     
 6.0     
 0.472381
 0.506109
 0.634877
In [50]:
z
Out[50]:
5-element Array{Float64,1}:
 2.0     
 0.351407
 0.472381
 0.506109
 0.634877
In [55]:
r = 1:5
Out[55]:
1:5
In [69]:
for itervar in r
    f = 1
    println(itervar)
end
1
2
3
4
5
In [70]:
itervar
UndefVarError: itervar not defined

Stacktrace:
 [1] include_string(::String, ::String) at .\loading.jl:522
In [72]:
x = linspace(0,2π,100)
y = sin.(x);
In [73]:
using PyPlot
In [80]:
plot(x,y,"b--",linewidth=3)
grid("on")
In [81]:
whos()
                             A     93 bytes  4-element Array{Any,1}
                          Base               Module
                       BinDeps  24680 KB     Module
                    ColorTypes  24771 KB     Module
                        Colors    356 KB     Module
                        Compat  24554 KB     Module
                         Conda  24559 KB     Module
                          Core               Module
             FixedPointNumbers  25031 KB     Module
                        IJulia  24807 KB     Module
                          JSON  24628 KB     Module
                      JuliaPro   1997 bytes  Module
                  LaTeXStrings   4018 bytes  Module
                    MacroTools  25018 KB     Module
                          Main               Module
                       MbedTLS  24648 KB     Module
                     Nullables   1112 bytes  Module
                        PyCall  24830 KB     Module
                        PyPlot  25153 KB     Module
                      Reexport   4619 bytes  Module
                           SHA     70 KB     Module
                     URIParser  24564 KB     Module
                           ZMQ  24615 KB     Module
                             i      0 bytes  0-element Array{Any,1}
                             r     16 bytes  5-element UnitRange{Int64}
                    uv_pollcb2      0 bytes  #uv_pollcb2
                             x     48 bytes  100-element StepRangeLen{Float64,B…
                             y    800 bytes  100-element Array{Float64,1}
                             z     40 bytes  5-element Array{Float64,1}
                            🐢      8 bytes  Int64
In [ ]: