In [8]:
Pkg.update()
Pkg.add("PyPlot")
Pkg.add("Gadfly")
Pkg.add("IJulia")


INFO: Updating METADATA...
INFO: Updating Plotly...
INFO: Updating Control...
INFO: Computing changes...
INFO: No packages to install, update or remove
INFO: Nothing to be done
INFO: Cloning cache of ArrayViews from git://github.com/JuliaLang/ArrayViews.jl.git
INFO: Cloning cache of Calculus from git://github.com/johnmyleswhite/Calculus.jl.git
INFO: Cloning cache of Compose from git://github.com/dcjones/Compose.jl.git
INFO: Cloning cache of Contour from git://github.com/tlycken/Contour.jl.git
INFO: Cloning cache of DataArrays from git://github.com/JuliaStats/DataArrays.jl.git
INFO: Cloning cache of DataFrames from git://github.com/JuliaStats/DataFrames.jl.git
INFO: Cloning cache of DataStructures from git://github.com/JuliaLang/DataStructures.jl.git
INFO: Cloning cache of Distances from git://github.com/JuliaStats/Distances.jl.git
INFO: Cloning cache of Distributions from git://github.com/JuliaStats/Distributions.jl.git
INFO: Cloning cache of Docile from git://github.com/MichaelHatherly/Docile.jl.git
INFO: Cloning cache of DualNumbers from git://github.com/JuliaDiff/DualNumbers.jl.git
INFO: Cloning cache of GZip from git://github.com/JuliaLang/GZip.jl.git
INFO: Cloning cache of Gadfly from git://github.com/dcjones/Gadfly.jl.git
INFO: Cloning cache of Grid from git://github.com/timholy/Grid.jl.git
INFO: Cloning cache of Hexagons from git://github.com/dcjones/Hexagons.jl.git
INFO: Cloning cache of Iterators from git://github.com/JuliaLang/Iterators.jl.git
INFO: Cloning cache of KernelDensity from git://github.com/JuliaStats/KernelDensity.jl.git
INFO: Cloning cache of Loess from git://github.com/dcjones/Loess.jl.git
INFO: Cloning cache of Measures from git://github.com/dcjones/Measures.jl.git
INFO: Cloning cache of NaNMath from git://github.com/mlubin/NaNMath.jl.git
INFO: Cloning cache of Optim from git://github.com/JuliaOpt/Optim.jl.git
INFO: Cloning cache of PDMats from git://github.com/JuliaStats/PDMats.jl.git
INFO: Cloning cache of PositiveFactorizations from git://github.com/timholy/PositiveFactorizations.jl.git
INFO: Cloning cache of Showoff from git://github.com/JuliaGraphics/Showoff.jl.git
INFO: Cloning cache of SortingAlgorithms from git://github.com/JuliaLang/SortingAlgorithms.jl.git
INFO: Cloning cache of StatsBase from git://github.com/JuliaStats/StatsBase.jl.git
INFO: Cloning cache of StatsFuns from git://github.com/JuliaStats/StatsFuns.jl.git
INFO: Cloning cache of WoodburyMatrices from git://github.com/timholy/WoodburyMatrices.jl.git
INFO: Installing ArrayViews v0.6.4
INFO: Installing Calculus v0.1.14
INFO: Installing Compose v0.4.2
INFO: Installing Contour v0.1.0
INFO: Installing DataArrays v0.3.0
INFO: Installing DataFrames v0.7.1
INFO: Installing DataStructures v0.4.4
INFO: Installing Dates v0.4.4
INFO: Installing Distances v0.3.1
INFO: Installing Distributions v0.8.10
INFO: Installing Docile v0.5.23
INFO: Installing DualNumbers v0.2.2
INFO: Installing GZip v0.2.18
INFO: Installing Gadfly v0.4.2
INFO: Installing Grid v0.4.0
INFO: Installing Hexagons v0.0.4
INFO: Installing Iterators v0.1.9
INFO: Installing KernelDensity v0.1.2
INFO: Installing Loess v0.0.6
INFO: Installing Measures v0.0.2
INFO: Installing NaNMath v0.2.1
INFO: Installing Optim v0.4.5
INFO: Installing PDMats v0.4.1
INFO: Installing PositiveFactorizations v0.0.1
INFO: Installing Showoff v0.0.7
INFO: Installing SortingAlgorithms v0.0.6
INFO: Installing StatsBase v0.8.1
INFO: Installing StatsFuns v0.2.1
INFO: Installing WoodburyMatrices v0.1.5
INFO: Package database updated
INFO: Nothing to be done

In [1]:
Pkg.add("ControlSystems")


INFO: Nothing to be done
INFO: METADATA is out-of-date — you may not have the latest version of ControlSystems
INFO: Use `Pkg.update()` to get the latest versions of your packages

In [9]:
Pkg.add("IJulia")


INFO: Nothing to be done

In [2]:
using PyPlot
PyPlot.svg(true)


INFO: Recompiling stale cache file /home/kjartan/.julia/lib/v0.4/PyCall.ji for module PyCall.
INFO: Recompiling stale cache file /home/kjartan/.julia/lib/v0.4/PyPlot.ji for module PyPlot.
Out[2]:
true

In [3]:
using ControlSystems

In [4]:
G = tf([3], [1, 3, 3])


Out[4]:
TransferFunction:
      3.0
----------------
s^2 + 3.0s + 3.0

Continuous-time transfer function model

In [9]:
using Gadfly
stepplot(G);
#PyPlot.show()


INFO: Precompiling module Gadfly...
INFO: Recompiling stale cache file /home/kjartan/.julia/lib/v0.4/Codecs.ji for module Codecs.
PyError (:PyObject_Call) <type 'exceptions.IOError'>
IOError('Julia exception: MethodError(flush,(IOBuffer(data=UInt8[...], readable=true, writable=true, seekable=true, append=false, size=41085, maxsize=Inf, ptr=41086, mark=-1),))',)
  File "/home/kjartan/anaconda2/lib/python2.7/site-packages/matplotlib/backends/backend_qt5agg.py", line 196, in print_figure
    FigureCanvasAgg.print_figure(self, *args, **kwargs)
  File "/home/kjartan/anaconda2/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 2232, in print_figure
    **kwargs)
  File "/home/kjartan/anaconda2/lib/python2.7/site-packages/matplotlib/backends/backend_svg.py", line 1206, in print_svg
    return self._print_svg(filename, svgwriter, fh_to_close, **kwargs)
  File "/home/kjartan/anaconda2/lib/python2.7/site-packages/matplotlib/backends/backend_svg.py", line 1235, in _print_svg
    renderer.finalize()
  File "/home/kjartan/anaconda2/lib/python2.7/site-packages/matplotlib/backends/backend_svg.py", line 295, in finalize
    self.writer.flush()
  File "PyCall.jl", line 1, in <lambda>


In [7]:
mag, ph, w = bode(TransferFunction([G]), (0.001, 10));


LoadError: MethodError: `convert` has no method matching convert(::Type{ControlSystems.TransferFunction{S<:ControlSystems.SisoTf}}, ::Array{ControlSystems.TransferFunction{ControlSystems.SisoRational},1})
This may have arisen from a call to the constructor ControlSystems.TransferFunction{S<:ControlSystems.SisoTf}(...),
since type constructors fall back to convert methods.
Closest candidates are:
  call{T}(::Type{T}, ::Any)
  convert{T<:Real}(::Type{ControlSystems.TransferFunction{S<:ControlSystems.SisoTf}}, !Matched::Union{Array{T<:Real,1},Array{T<:Real,2}})
  convert{T}(::Type{T}, !Matched::T)
  ...
while loading In[7], in expression starting on line 1

In [27]:
semilogx(w, ph[:])


Out[27]:
1-element Array{Any,1}:
 PyObject <matplotlib.lines.Line2D object at 0x7fc254282d90>

In [46]:
pw = cat(2, ph[:], w);
for i=1:size(pw,1)
    @printf "%f, %f\n"  pw[i,1] pw[i,2]
    #print( pw[i,1] ) 
    #print('\t')
    #println( pw[i,2])
end


LoadError: syntax: invalid character literal
while loading In[46], in expression starting on line 3

In [6]:
magic


LoadError: UndefVarError: magic not defined
while loading In[6], in expression starting on line 1

In [ ]: