It has been quite some time since I get my hands dirty on MATLAB, a powerful mathematical and simulation application (software), which I previously used to run extensive simulations over several days and weeks. I am still highly fascinated with MATLAB, as it practically allows users to program work the way they want them to be.
Perhaps, when I have more time to run some data analysis or data crunching, I will be getting back to use MATLAB again. However, as we know sometimes MATLAB takes up quite a huge amount of memory consumption and it is not the most efficient application for running linear algebra, programming part of the source code in C language will be a great idea!
Combining the C language and MATLAB together brings out a fortified data-crunching simulation. It is extremely good when run with “nodesktop” and “nojvm”. In so doing, the amount of memory allocation is greatly reduced whilst freeing up for the use of large-scale data-crunching analysis.
Anyway, I will talk more about it again when I have time. Right now, I am getting back to make use of this application to bring out the best in Dynamic System Identification.
Matlab provides a huge library of toolboxes and I used a lot on the Optimisation Toolbox; particularly – fmincon and fminunc.
FMINCON is a function script from the MATLAB Optimisation Toolbox that uses constrained optimisation routines to minimise (or maximise) functions.
FMINUNC is a function script from the MATLAB Optimisation Toolbox that uses unconstrained optimisation routines to minimise (or maximise) functions.
These two functions are extremely powerful which can be used to find the minimum point of any smooth stochastic function. They can incorporate Gradient and Hessian information to help speed up the optimisation; or otherwise these values can be approximated by finite-differencing.
MATLAB is a powerful piece of programming language used. However, since it runs on machine, there is always a finite level of precision, no matter how accurate the program is being developed.
For instance, a positive-definite matrix, A, is created with several repmat and permute commands, the symmetry of the entries within the matrix may no longer be exact. This will produce an error indicating that A is not a positive-definite matrix.
One of the way, which is also a very easy method, is to get rid of the slightest discrepancy between the symmetrical entry; for example, A(10,1) should be of the same value as A(1,10). To do so, simply compute the following command after obtaining A.
A = 0.5*(A + AT);
In this way, it ensures that the respective entries in the matrices are exactly symmetrical! A simply tip, but it’s worthwhile using it as a practice.