43

Getting Started in MATLAB


Article posted on Thursday, 23rd, February, 2012 at 1:14 pm


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…

So what is MATLAB? It is a commercial, high level programming language that runs in its own environment, and has lots of lovely in built functions, which are easy to use and require very few lines of code. This makes it great for prototyping systems or developing solutions before building them at production level.

“Why can’t I use MATLAB to build my own production level software?” I hear you ask! Well, you can, but typically, MATLAB is a lot slower than lower level languages, and to compile MATALAB scripts and functions into exes, you need to buy an extra (very expensive) Toolbox.

Having had experience with various installations of MATLAB (including installing a network concurrent license server on a Virtual Machine), I can say the process of getting MATLAB up and running can be incredibly easy, but depending on your system setup, it can also baffle the customer services!

A quick tip – if you have any non-standard issues with installation, contact their technical support, as the standard customer services guy told me he couldn’t help me with installation on a virtual machine and just hung up (even though I was upgrading from R2008a to R2009a!).

 

Anyway, MATALB is lovely for writing stuff quickly. You can do things in one line of code that would take several in a language like C++. For example, a C++ hello world program would be written like this:

 

#include <iostream>

void main()
{
    std::cout << "Hello, World!" << endl;
}

 

Whereas in MATALB, your code would look like this:

 

disp('Hello, World!');

 

Much easier, huh?



Tags: , , , , ,

Join in the Conversation


comments powered by Disqus