Quantcast
Channel: First steps - JuliaLang
Viewing all articles
Browse latest Browse all 2795

Plotting two different functions

$
0
0

Hello, there! I’m trying to plot two different functions at the same graph, using Plots.jl, as follows

Pkg.add("Plots")
using Plots

p(s) = s/2 * exp(-s^2/4)

g(s) = exp(-s)

plot(p,g)

but I receive the error message

>AssertionError: !(F2 <: Function || F2 <: AbstractArray && F2.parameters[1] <: Function)

There is an error at my syntaxe or I can not do it with Plots.jl?

4 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 2795

Trending Articles