How to read julia variables with Matlab

Hi all,

I am looking for a simple way to save julia variables, and use Matlab to read them, and finally become variables in Matlab

For example, I have a 3-D array:

x = rand(2, 3, 4)

My current approach is to use the XLSX.jl package to save the variables as an Excel file. There are 4 sheets in this file, and each sheet is a 2x3 array.

Then, I wrote an m-function in Matlab to read them so that I can use the plotting function of Matlab

Although there are many drawing packages in julia, I am very familiar with the drawing function of matlab, and it is very convenient to save matlab pictures to Microsoft Visio.

However, the interaction with Excel is very slow, whether in julia or matlab.

Thanks a lot!

Using MAT.jl might be the easiest.

Linking this announcement too, just in case.

2 Likes

Maybe try calling Matlab from Julia: https://github.com/JuliaInterop/MATLAB.jl ?

Thank you very much! It is indeed the easiest way for me.

Thank you to your reply!