RSS

Category Archives: Maths

Matlab 2012b released! Yes, Ribbon UI


New Features here.

Advertisements
 
Leave a comment

Posted by on September 14, 2012 in Maths

 

Matlab path changed, COMSOL didn’t know, then …


After installation of COMSOL, the Matlab path may be changed, for instance after update or re-installation. Now if you run COMOSOL with Matlab, there will be an error, or sth like that:

COMSOL_matlab_path

Read the rest of this entry »

 
Leave a comment

Posted by on November 12, 2010 in Maths

 

Tags:

Matlab path changed, COMSOL didn’t know, then …


After installation of COMSOL, the Matlab path may be changed, for instance after update or re-installation. Now if you run COMOSOL with Matlab, there will be an error, or sth like that:

COMSOL_matlab_path

Read the rest of this entry »

 
Leave a comment

Posted by on November 12, 2010 in Maths

 

Tags:

Particle swarm optimization: the simplest what and how


While there exist many introductory materials on Particle Swarm Optimization (PSO), it is best to have an intuitive example, simple, understandable at first reading, and illustrative. I personally do not like those examples that try to bring all intricacies together. Here comes the simplest example I guess: to find a minimum for the function:

clip_image002

It is know that the optimal solution is found when x=-1, and the minimum is f(x)=0;

The below video demonstrate the results of finding this optimal solution using PSO based approach:

As you can see, after some initial random movements of the design variables, the design variable gradually converges to x=-1 (the black curve) and the optimal value reaches 0.

Read the rest of this entry »

 
4 Comments

Posted by on November 11, 2010 in Maths, Programming

 

mllapack.dll crashing problem: finally solved in Matlab 2010b


If you would like to call matlab functions in DotNet or com, and your function calls involve some functions which rely on lapack functions, and prior to Matlab 2010b, you may find that your program crashes. Tracing the problem, you will find this is due to a dll (mllapack.dll), and the problem is reported here, and here.

In Matlab 2010b, I have tested two functions which depend on the LAPACK, and it works now!

Download demo VS2010 project here.

 
Leave a comment

Posted by on September 26, 2010 in Dotnet/C#, Maths

 

Using .Net object in Matlab


Matlab ’s function is power, but not enough. Sometimes, you need some functionality from .net. One example is the Bezier curve class, which is absent in Matlab.

Read the rest of this entry »

 
1 Comment

Posted by on July 3, 2010 in Dotnet/C#, Maths

 

Matlab crashes during optimization and other function calls: trouble shooting


In programming Matlab, suddenly it crashes. Face it.

One of the occasion is when I call the norm function programmatically. In the interactive command window, there is no problem, but if you use it in script. Sorry, it just crashes, with a console window disappeared before you have time to read the details.

2010-04-23_1254

After Google searching, here is the solution, and it worked for me at least: add a system variable “KMP_DUPLICATE_LIB_OK” with its value set to “TRUE”.

Matlab_Crashes

 
Leave a comment

Posted by on April 27, 2010 in Maths, Programming