slug
tags
password
icon
lang
date
category
type
status
summary
{/* truncate */}
Install the new MATLAB Engine with MATLAB R2023b
MATLAB has released the new native version of MATLAB R2023b, which can smoothly work on Apple Silicon. You can download from the below link:Note: Remember to select the apply silicon version.The MATLAB.jl has also updated, you can add the package from Julia byusing Pkg; Pkg.add(”MATLAB”). Once the installation and precompile finished, you can use the MATLAB engine in Julia.
Issue with MATLAB Engine on Apple Silicon
Because MATLAB are still running on
x86_64 platform, MATLAB Engine for Python or Julia is invalid on Apple Silicon native platform. If you want to use MATLAB Engine, you can only install all the software on x86_64 platform.Install Homebrew via x86_64 platform
- Install
homebrewviaarch-x86_64platform
- Add
arch-x86_64toPATHin~/.zshrc. byopen ~/.zshrcand add the following line to the end of the file.
The
brow is the alias for brew and ib is the alias for arch-x86_64.- Add an alias to switch between
arch-x86_64andarch-arm64platform
Install Julia via x86_64 platform
- Install Julia via
arch-x86_64platformhomebrew.
Wait for the installation.
Install MATLAB Engine for Julia
- Start Julia
ib juliaand installMATLABpackage.
- Test the availability.
The return value should be
5.Everytime when you run Julia rememeber to add
ib julia rather than julia to start Julia if you want to use MATLAB Engine.If you only need the Julia function, I suggest to run native version of Julia on Apple Silicon.
- Author:PENG Jiaxin
- URL:https://www.pengjiaxin.com/article/matlabengine-julia
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!