Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to call a function from another folder in julia

Tags:

julia

I am new in Julia and saying good bye to MATLAB, The issue here is that I am trying to set a script with all my functions where I can go later and perform some operations.

I have tried to do so in a MATLAB style, I also tried to read the documentation, but neither help that much.

So the question here is: how do I set a .jl file in another folder so that I can call this file later on in Julia?.

Hint: I am using Atom as an editor

KR Rubén

like image 830
Rubén Pérez Sanz Avatar asked Feb 06 '19 14:02

Rubén Pérez Sanz


1 Answers

You can include any .jl file in a Julia session:

include("/path/to/my/jl/file/functions.jl")

Afterwards, all the function definitions etc. in functions.jl are available.

like image 128
carstenbauer Avatar answered Nov 29 '22 12:11

carstenbauer