# Julia for MATLAB Users

*A Free Online Reference*

## Introduction[編輯]

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).

## Contents[編輯]

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.

### Introduction to Julia for MATLAB users[編輯]

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.

### Tutorials[編輯]

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.

### MATLAB-to-Julia Functions Mapping[編輯]

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[編輯]

The most recent MATLAB documentation (currently R2018a^{[1]}) 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.

## Related Resources[編輯]

### Julia[編輯]

- The learning section at Julia's official site.
- Julia documentation, a.k.a. the Julia manual.
- Packages
- Julia package index
- Julia Observer

- Julia Discourse forums

### Julia and MATLAB[編輯]

- 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[編輯]

Contributions are encouraged! See the WikiBooks Help:Contributing page. In particular here are some notes on contributions to this book.

### Style[編輯]

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[編輯]

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 `ans`

.

#### Links[編輯]

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 linksLinks 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.

^{[2]}

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).
- ↑ https://stackoverflow.com/help/how-to-answer