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


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


Original blog illustration by Cali Rossi

Before we move back to Matlab, I am very happy to announce, for the new year, that 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

Update on the first presentation of SpikeE

I want to thank all that attended our Poster in New Orleans. It was fantastic to feel that our enthusiast for SpikeE was shared among so many labs.  I set up a mailing list to keep anyone update on the development of SpikeE. It is a google group. Anyone is free to join. I am looking forward to see how SpikeE performs and realize this vision of a plateform to easily share code between programmers and non-expert users in many labs.

Posted in Various | Leave a comment