Professional deployment of Matlab code

Original blog illustration by Cali Rossi

Original blog illustration by Cali Rossi

This post marks the one year existence of this blog. I started writing in the hope to help folks get started with Matlab and also help rise the general quality of Matlab codes. Traffic have risen steadily in the last year as we are touching 900 pages per day of regular traffic for the first time today. Traffic, so far, has seemed to be doubling every 3 months! Whether I meet my goals, I don’t know, but at least this blog seems useful! For today, I chose a subject that fits into that anniversary context as it deals with how to package your Matlab programs for others.

Although Matlab is often used to quickly prototype ideas, professional applications can be done with Matlab. You can, if you want, create high-quality interfaces that benefits from the great calculation engine of Matlab. I found little help on the Internet on that subject (except for Yair’s excellent blog) so I thought it was a good occasion to help filling in the gap. In this post I talk about how to distribute your compiled application to colleagues/clients/friends in a very professional fashion.

Continue reading

Posted in Advanced, Making interfaces | 8 Comments

How to organize your Matlab files?

Organize your files by Cali Rossi

Original blog illustration by Cali Rossi

Organizing your code is something that is absolutely crucial if you wish to grow your code base, especially if you wish to keep your code for a long time and/or pass it on to new programmers. There are multiple ways to do this in Matlab. In this post, I talk about these as well as some of the basic principles you must keep in mind when you organize your code.

Continue reading

Posted in Intermediate | 7 Comments

Computer vs human memory

Human_vs_Computer

Original blog illustration by Cali Rossi

Memory management is an essential skill that every programmer develops over time. To develop that skill you need to have a sense of how computer memory works. Surprisingly,  memory is not a simple thing. It is actually quite complex and only a few experts actually understand all of the details. In this post, I make an analogy between computer and human memory to explain the basics of both. This leads me to dive into the core of both computers and human minds as these are deeply intermingled.

Continue reading

Posted in Beginners, Various | 8 Comments

Making interfaces WITHOUT guide

Interface without a guide by Cali Rossi

Original blog illustration by Cali Rossi

You know that feeling, I am sure.  You know that you should learn this thing, that your current set of knowledge is limiting what you can do, that it will be so much easier once you have learned it. Still you are comfy in your current set of skills. Your brain is the lazy culprit. If you know what I am talking about, STOP that and STOP using the GUIDE to make interfaces in Matlab. It’s time to jump ahead and do the real thing. Trust me, I have been there. Read on and fly…

Continue reading

Posted in Intermediate, Making interfaces | 17 Comments

Using pointers in Matlab

et3

Original blog illustration by Cali Rossi

Before we move back to Matlab, I am very happy to announce, for the new year, that Matlabtips.com got itself a professional illustrator. We are now well equipped to fulfill our mission : Make learning Matlab easy and entertaining. Among my resolutions for new year, there is one to make tons of new posts (illustrated this time with original drawings!).

As I discussed already several times, Matlab has supposedly no real equivalent to the C pointer available to you. This is so due to a design choice from Mathworks. The entire language is organized to avoid pointers. Even so, there are occasions where a pointer is really what we need, like when you are dealing with very large datasets that take nearly the entire memory. In this post, I first introduce you to the world of pointer and then shows you how to use them in Matlab for real.   Continue reading

Posted in Advanced, Optimizing your code | 13 Comments

Child swapping

photo-manipulation-parents-children-swap-head-paulripke (13)Today I am going to present a technique that I have used extensively to deal with figures. I have never seen it named before or even presented anywhere on the web so I decided to call it “Child Swapping” (edit : Yair from Undocumentedmatlab rightfully pointed out that this technique is often called re-parenting. I like my own name too though so I kept the post title). I believe this technique is very useful when you have to manipulate figure windows, reuse them in a different context or concatenate them together. So if I managed to tickle your curiosity, read on. Continue reading

Posted in Advanced, Making interfaces | 3 Comments

Structure, cell or both?

In this post, I talk about the two heterogenous containers that are available to you in Matlab, the structure and the cell. I explain when you probably want to use one or the other and when you probably should not. As often, I end with some ideas for little more advanced programmers on how to combine cell and structures together.

Continue reading

Posted in Intermediate | 5 Comments