Last active
February 12, 2018 18:38
-
-
Save miguelraz/597701ef8ba3a8d18d66a7b27d78f3d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkgs = [ | |
"BenchmarkTools", "ProfileView", "CpuId", | |
"MacroTools", "RecursiveArrayTools", "ASTInterpreter2", | |
"Turing", | |
"DynamicalSystems", | |
"Convex", "JuMP", "Optim", | |
"ForwardDiff", "DiffRules", "DiffResults", "ReverseDiff", | |
"LightGraphs", | |
"Tensors", | |
"DifferentialEquations", | |
"SaferIntegers", "ChangePrecision", | |
"CUDAdrv", "CUDAnative", "CUDArt", "CuArrays","LLVM", "Cxx", "OpenCL", "GPUArrays", | |
"ValidatedNumerics", "SpecialFunctions", "CoordinateTransformations", "Flux", | |
"JuliaDB", "DistributedArrays", "PETSc", "MPI","Daggger", "ClusterManagers", | |
"StructsOfArrays", "AxisArrays", "DataFrames", | |
"UnicodePlots", "Plots", "Gadfly", "OhMyREPL", "Makie", "GLVisualize","Luxor", "VoronoiDelaunay", | |
"ArbFloats", "ChangePrecision", "SaferIntegers", | |
"Revise", | |
"Documenter", "PkgDev", | |
"IJulia", "Interact"] | |
for pkg in pkgs | |
Pkg.add(pkg) | |
end | |
f(t,u) = 1.01*u | |
u0=1/2 | |
tspan = (0.0,1.0) | |
prob = ODEProblem(f,u0,tspan) | |
sol = solve(prob,Tsit5(),reltol=1e-8,abstol=1e-8) | |
using Plots | |
plot(sol,linewidth=5,title="Solution to the linear ODE with a thick line", | |
xaxis="Time (t)",yaxis="u(t) (in μm)",label="My Thick Line!") # legend=false | |
plot!(sol.t, t->0.5*exp(1.01t),lw=3,ls=:dash,label="True Solution!") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment