Julia for MATLAB Users
| This page was last edited on 24 August 2021, and is still under heavy construction.
Content that is added is likely to be moved/deleted/edited significantly in a short amount of time. All Wikibookians with knowledge in this subject are welcome to help out.
You can remove this tag when the book has become more mature.
Introduction[edit | edit source]
This Wikibook is a place to capture information that could be helpful for people interested in migrating code from MATLAB™ to Julia, and also those who are familiar with MATLAB and would like to learn Julia. It is meant to supplement existing resources, for instance the noteworthy differences from other languages page from the Julia manual. However this wiki intends to be more comprehensive, and to be structured in such a way as to make it easy for one to find answers to questions like:
- For a given MATLAB or MATLAB toolbox command/function/construct what are the closest Julia equivalents?
- For a given MATLAB toolbox, what Julia packages provide similar functionality?
All of the content here is geared towards someone with a MATLAB background. In general this book assumes that the reader is well acquainted with the fundamentals of MATLAB and any aspects of that product that they are interested in seeing the Julia equivalent(s) for. This book is not intended to be a resource for learning MATLAB! In contrast, we do not assume any knowledge of Julia, but leave general purpose introductions to the language to other resources (see Related Resources below for some of these).
There are also tools to access Julia from MATLAB.
Contents[edit | edit source]
The book contains distinct sections offering readers different ways to approach learning how to use Julia from the point of view of a MATLAB user.
This part provides a guided tour of Julia intended to orient a typical MATLAB user to some of the most significant aspects of Julia, emphasizing what might be some of the more unexpected differences and also highlighting some of the areas where Julia has particular strengths relative to MATLAB.
This part includes short tutorials that walk MATLAB users through some typical example scenarios, each demonstrating how some particular workflow or idiom from MATLAB would translate to Julia.
The organization of this part of the book mirrors that of the MathWorks' on-line documentation; that is, the core MATLAB language features are together in the MATLAB section which when complete would map everything found in the core MATLAB documentation to Julia equivalents, while another section on the Control System Toolbox, for instance, would map functionality documented in its toolbox documentation page to Julia equivalents.
Applicable Versions[edit | edit source]
The most recent MATLAB documentation (currently R2020a) is assumed unless otherwise specified.
In general when equivalent Julia 1.0 (i.e. 0.7 without deprecation warnings) functionality exists this is what will be linked to, but in cases where this does not exist but an earlier version, e.g. 0.6, has the functionality the latter may be linked to. A more recent version of Julia like Julia 1.5.1 might be advised.
Related Resources[edit | edit source]
Julia[edit | edit source]
- The learning section at Julia's official site
- Julia documentation, a.k.a. the Julia manual
- Julia Discourse forums
Julia and MATLAB[edit | edit source]
- QuantEcon MATLAB - Python - Julia Cheatsheet
- Automatic MATLAB to Julia converter (limited in its usefulness, especially for functions in toolboxes)
- Package for calling MATLAB in Julia through MATLAB Engine: MATLAB.jl
- Rosetta Code Julia category and MATLAB category
- MatlabCompat.jl (appears to be unmaintained)
- Introducing Julia Wikibook
- Basic Comparison of Python, Julia, Matlab, IDL and Java (2018 Edition)
Contributing[edit | edit source]
Contributions are encouraged! See the WikiBooks Help:Contributing page. In particular here are some notes on contributions to this book.
Style[edit | edit source]
Of course, follow the Wikibooks Manual of Style. In addition, specific to this book the following style conventions apply.
MATLAB and Julia command/function names[edit | edit source]
Command and function names in either language when written inline should be in
code text format. In addition in the individual command/function name sections the MATLAB command/function names should link to an appropriate page in the MATLAB documentation and similarly for the Julia equivalent where it is first mentioned on that page. For example, see the entry for
Links[edit | edit source]
In general the intent is to capture the information itself in this wiki, for the same reasons as this is encouraged on Stack Overflow:
Provide context for links
Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline.
As such, it is assumed that the main Julia documentation isn't at risk of going offline, but the salient points from other sources should in general be included in this wiki so it is largely self-contained (and thus is itself suitable for offline use). Of course, attribution by means of links to sources of information is highly encouraged.
- Only the most recent MATLAB documentation is available on the MathWorks' website without a login; previous releases' documentation is accessible with but only with a login (though creating one appears not to require a MATLAB license).