This is a Julia 1.x rewrite of the codes in Trefethen's Spectral Methods in MATLAB. It's in alpha and the codes are not at all thoroughly checked yet, much less made beautiful.
The graphics is done by PyPlot
, which is the most MATLAB-like interface (but not the one most used in Julia).
I recommend that you create a separate Julia environment to work with this package. Change to a new directory for it and enter
import Pkg; Pkg.activate(".")
to create the environment. Then
Pkg.add(url="https://github.com/tobydriscoll/SpectralMethodsTrefethen.jl")
Pkg.add("PyPlot")
To get the package loaded, activate the dedicated environment, then enter
using SpectralMethodsTrefethen,PyPlot
pygui(true)
Then each of the book's program scripts can be run as functions, e.g. p1()
, p2()
, etc. Some of the functions have additional versions with a suffix like b
or u
.
The book functions cheb
, chebfft
, clencurt
and gauss
are also available.
As with any Julia function, you can use the @edit
macro, like in
@edit p1()