# MATLAB to Julia wiki

**URL:** <https://discourse.julialang.org/t/matlab-to-julia-wiki/12381>\
**Category:** New to Julia\
**Created:** [July 14, 2018, 10:17pm UTC](https://discourse.julialang.org/t/matlab-to-julia-wiki/12381 "2018-07-14T22:17:05Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![airpmb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/airpmb/32/7826_2.png) [@airpmb](https://discourse.julialang.org/u/airpmb)\
**Post date:** [July 21, 2018, 3:41pm UTC](https://discourse.julialang.org/t/matlab-to-julia-wiki/12381/22 "2018-07-21T15:41:11Z")

</div>

> The julia wikibook exists and is well maintained (largely thanks to @cormullion).  
> I suggest you could create a chapter there and migrate it.

Thanks, I think I had seen the wikibook some time ago but didn’t think of it in this context. I do like the idea of migrating to it, though what I have in mind might not fit well under it’s stated intent of being “an introduction to the language for the less experienced and occasional programmer”. And I see that there’s download as HTML and download as PDF options which are dumps of the wiki which I think you wouldn’t want to fill with a lot of reference material such as in my wiki. But I’ll get in touch with the maintainers regardless. Maybe it would make sense to simply start another wikibook instead of a github wiki.

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [July 21, 2018, 4:20pm UTC](https://discourse.julialang.org/t/matlab-to-julia-wiki/12381/23 "2018-07-21T16:20:31Z")

</div>

Make a new wiki. Edit the existing one. **[Be bold](https://en.wikipedia.org/wiki/Wikipedia:Be_bold)**!

In wiki-land, noone owns anything! It’s far from perfect, but one advantage is that it requires no prior knowledge to make edits (no git knowledge, for example).

---

<div class="post-metadata">

**Author:** ![geoalchimista](https://avatars.discourse-cdn.com/v4/letter/g/f05b48/32.png) [@geoalchimista](https://discourse.julialang.org/u/geoalchimista)\
**Post date:** [July 21, 2018, 9:57pm UTC](https://discourse.julialang.org/t/matlab-to-julia-wiki/12381/24 "2018-07-21T21:57:55Z")

</div>

> [@Tamas\_Papp](#):
>
> IMO Julia requires a very different approach (small, modular functions, loops or broadcasting instead of vectorization, attention to type stability, etc), so while it is relatively easy to make a “literal translation” of simple Matlab scripts, the performance is often disappointing because of these gotchas. I have seen some people do this and conclude that Julia is super-slow.
> 
> Also, while there are of course exceptions to this, many Matlab scripts that I have seen are just badly written from a software engineering perspective — brittle to implicit or hidden assumptions, composed of large, monolithic functions, makign extensive use of global variables, and consequently lacking unit tests.

Yes. I think literal translation is only a first step. The translated code may still need heavy refactoring to become idiomatic Julia and performant. I’ve worked on porting some old MATLAB code into Julia, and I sometimes found that it would just be easier to write the code from scratch in Julia than translating it. I suppose that a translator may help get the tedious work done, but making the code idiomatic Julia requires a human mind.

I can second you on the account of badly written MATLAB code. Not saying all is bad, but the probability you encounter bad MATLAB code is way higher than bad Python or R code. From my personal experience, it is just so hard to persuade someone who speaks only MATLAB to care about code quality and readability, unit testing, orthogonal design, etc. People who write bad MATLAB code will just continue doing it that way, taxing the time and effort of others who have to read their code.

However, on the bright side, I’d consider that a strong reason to preach Julia and other good programming languages to people you work with. The best way to deal with multi-language problem is perhaps not to have to deal with it at all.

---

<div class="post-metadata">

**Author:** ![airpmb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/airpmb/32/7826_2.png) [@airpmb](https://discourse.julialang.org/u/airpmb)\
**Post date:** [July 22, 2018, 1:34am UTC](https://discourse.julialang.org/t/matlab-to-julia-wiki/12381/25 "2018-07-22T01:34:49Z")

</div>

> [@cormullion](#):
>
> Make a new wiki. Edit the existing one. **[Be bold](https://en.wikipedia.org/wiki/Wikipedia:Be_bold)**!

Thanks for the encouragement! Here it is as a WikiBook (still moving content over but it won’t be long).

[https://en.wikibooks.org/wiki/Julia\_for\_MATLAB\_Users](https://en.wikibooks.org/wiki/Julia_for_MATLAB_Users)

I already like the interface much better.

[Previous page](https://discourse.julialang.org/t/matlab-to-julia-wiki/12381.md?page=1)
