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

Accessing Matlab-function from Julia

$
0
0

Hello everyone,

I recently started to work with Julia and need to evaluate some custom matlab-functions in my julia-scripts. Therefore, I added the package MATLAB.jl and updated the environment variable MATLAB_HOME to the installation directory of the matlab version I use. However, I am not able to execute any of the mentioned examples in GitHub - JuliaInterop/MATLAB.jl: Calling MATLAB in Julia through MATLAB Engine .

For example, if i want to execute

using MATLAB

x = 5
mat"plot($x, sin($x))"

I get the following error-message

LoadError: UndefRefError: access to undefined reference

in expression starting at D:\UNI\Julia\test_matlab.jl:4

MSession(::Int64; flags::String) at engine.jl:26

MSession at engine.jl:23 [inlined]

MSession at engine.jl:23 [inlined]

get_default_msession at engine.jl:88 [inlined]

put_variable(::Symbol, ::Int64) at engine.jl:159

top-level scope at matstr.jl:160

include_string(::Function, ::Module, ::String, ::String) at loading.jl:1088

Moreover, I do not get this error for this example only, but for every listed example under GitHub - JuliaInterop/MATLAB.jl: Calling MATLAB in Julia through MATLAB Engine .

Any suggestions what could cause this error-message?

Best,
andre

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 2795

Trending Articles