MATLAB
Matlab is full of functions specifically designed to make your life easier. You should have an idea of how to use them, since we’ve already used a few in our examples. Making your own functions is a great way of saving yourself time for doing tasks you know you’ll need to do in the future…
So if you’ve read my previous posts on Matlab, you’ve learned a few basics, and have an idea about how 1D arrays are made. Now to discuss the joy of looping and how it can save you oodles of time…
Conditional statements are simple lines of code which will execute other code if certain criteria are met. Sound confusing? It’s easier than it sounds…
***BREAKING NEWS*** MATLAB counts from the number 1! What a crazy notion this is! Originally, I got so used to programming counts from 0, that this confused the life out of me – it’s quite intuitive once you re-adjust though…
MATLAB, like any other programming language requires you to be familiar with its syntax in order for you to get better at it. The good thing is that MATLAB syntax is very easy to pick up when you practise with it a bit. Here are a few pointers to help get you working with it…
Okay, so starting up MATLAB for the first time might make you think ‘Woah, this is it? This is what everyone’s been raving about? What’s so special about it?’. Well, let me spend a little time showing you how to set it up and get you up and running with it…
The great thing about MATLAB is that it doesn’t care what type of variables you’re using. This is very good for coding up a script / function / program in no time at all. It’s not so good if you accidentally reuse a variable name, with a different type (i.e. setting var1 = ‘hello’ and then later, reusing var1 = 123) . This will end up making problems with your program that are harder to trace.
You know what? I’ve been programming in MATLAB for 7 years now, and I’d never thought to blog about it. I always thought it was easy once you’d picked it up, but as always with most programmers – there aren’t too many that are particularly good at helping you understand the language. I thought I might try that myself…