How to store Julia variables and matrices like mat files in MATLAB

I just switched from Matlab to Julia. One thing I’m trying to figure out is how to store my variables in Julia like mat files in Matlab? For example, in Matlab I would do this:

save(‘test.mat’, ‘Var1’, ‘Var2’, ‘Var3’);

Would anyone please show me how to do this in Julia?

Thanks

MAT.jl has what you need. Also, both Matlab and Julia can read and write
HDF5 files (HDF5.jl).

1 Like

Many thanks! Glad to know the existence of such packages.

So Julia does not have its own proprietary way of storing variables on a hard disk?

Julia is open source, so the answer to that would be no.

There are plenty of packages that you could use though. JLD2.jl and HDF5.jl would offer similar capabilities to what you are used to in Matlab, I think.

1 Like

Many thanks! I’ll check them out.