Introduction (What is MATLAB):
Matrix Laboratory or MATLAB for short is perhaps the most popular tool used for computation and data visualization. The reason for its popularity are more to do with Microsoft monopoly on the software market because of its operating system than it being the best tool out there. But that would be me deviating from the topic.
So first of all what is Computation?
Any type of mathematical modelling especially involving the use of computers to process the data is computation. Now one would say is that not calculation? Well, no. Calculation is just the computation of numbers while computation as a whole involves information processing in general.
Matlab is basically a fourth generation programming language that allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages, including C, C++, Java, Fortran and Python.
Any tutorial on the net would start with its downloading and installation but well its already very well documented at their MATLAB official Documentation
So plunging ahead and coming directly to the point,
MATLAB has the capability of working on numerical data in the form of matrices and arrays.
Language fundamentals include basic operations, such as creating variables, array indexing, arithmetic, and data types.
It is a loosely typed language. Meaning there is no need to explicitly define a variable unless there is symbolic reference as an object.
A simple = is used to assign value to variables:
>> x = 17
x = ‘hat’
x = [3*4, pi/2]
y = 3*sin(x)
Arrays and Matrices
A simple array is defined using the colon syntax:
|init : increment : terminator|
|array starts at 1 (the init value), increments with each step from the value by 2 (the increment value), and previous stops once it reaches (or to avoid exceeding) 9 (the terminator value)|
Other features include Array indexing, concatenation, sorting, and reshaping.
Operators and Elementary Operations
- Arithmetic: Addition, subtraction, multiplication, division, power, rounding
- Relational: Operations Value comparisons
- Logical Operations: True or false (Boolean) conditions
- Set Operations: Unions, intersection, set membership
- Bit-Wise Operations: Set, shift, or compare specific bit fields
By default, MATLAB® stores all numeric variables as double-precision floating-point values. Additional data types store text, integer or single-precision values, or a combination of related data in a single variable. For more information, see Fundamental MATLAB Classes or watch Introducing MATLAB Fundamental Classes (Data Types).
As I said earlier this post is not a tutorial for Matlab one can easily find a well defined documentation. Some other basic features include:
Linear algebra, basic statistics, differentiation and integrals, Fourier transforms, and other mathematics
Two- and three-dimensional plots, images, animation, visualization
Program files, control flow, editing, debugging
Text files, spreadsheets, and other file formats; big data; web access
Application development using GUIDE and callbacks
Object-oriented programming; code performance; unit testing; external interfaces to Java , C/C++, .NET and other languages
Preferences and settings, platform differences
Support for third-party hardware, such as webcam, Raspberry Pi™, and Arduino® hardware
As a teaching tool, though, it suffers from one major defect: it’s very expensive. And the add-on toolboxes add to its cost.
There’s therefore the need of a low-cost – preferably open-source – alternative, which can be used by students as a sort of drop-in replacement for experimentation at home, or on their own laptops.
My recommendations? Use Octave, unless you have some niche requirements, in which case you may find Scilab more suitable. If you’re prepared to sacrifice maturity for speed, give Julia a go. If your wish is a mature programming language as your base, then Python.