This package consumes the following services:
Atom Matlab Editor
MATLAB Editor's functionalities and utilities in Atom.
Setup
-
Execute
matlab.engine.shareEngine('AtomMatlabEngine')
in your current MATLAB instance, or put the line in yourstartup.m
. -
Add the folder
[...]\.atom\packages\atom-matlab-editor\lib\java
to your MATLAB search path. -
Insert all the needed informations in the package's config.
- To retrieve your MATLAB root path, type
matlabroot
in your MATLAB instance. - For the computer architecture, type
computer('arch')
. - For the preferences folder and temporary folder, type respectively
prefdir
andtempdir
. - Select the relative checkbox if your MATLAB version is strictly older than R2020a.
- To retrieve your MATLAB root path, type
-
In case of "no nativemvm in java.library.path" error: add the correct path to your environmental variables as explained in this MATLAB Answers thread, and then restart Atom.
How it works
Atom Matlab Editor utilizes Java as a bridge between Atom and MATLAB, without the need to have a separate Java installation since the package uses the executable shipped with MATLAB.
WARNING: This package is developed on Windows with MATLAB R2020a (initially with R2017a). It's safe to assume that the package works for all the versions in between. For now the focus is on implementing/polishing all the features, therefore compatibility with versions older than R2017a is not guaranteed. For this reason, remember to specify your OS and MATLAB version in any bug report.
Features
- Run file (
F5
), section (CTRL+F5
) or selection (F9
) in the current MATLAB instance. - Save and run file (
ALT-F5
). Be careful, sometimes MATLAB fails to notice that a file has been modified by an external editor. - Call the MATLAB help in the Atom Editor (
F1
on selection). - Open function/script file in MATLAB search path from the Atom Editor (
CTRL+F1
). - Change current folder in Matlab from Atom (
Right-Click
on the relative TextEditor tab). - Open file in Matlab (
Right-Click
on the TreeView item). - Check your Current Matlab Folder directly on the Atom statusbar.
Planned Features
- Change Current Matlab Folder from the statusbar.
- Compatibility with versions less than R2017a.