# Category Archives: Maths

## Matlab 2012b released! Yes, Ribbon UI

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: Posted by on November 12, 2010 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: Posted by on November 12, 2010 in Maths

## 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: 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.

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!

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.

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. 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”. Posted by on April 27, 2010 in Maths, Programming

## C# and Maths Soft

Posted by on April 15, 2010 in Maths, Programming

## COMSOL Multiphysics Programming Note (I)

fem.equ—contains information about equations on subdomains

fem.bnd—contains information belonging to boundaries

fem.edg—in 3D, this field is related to edges (curves)

fem.pnt—in 2D and 3D, this field corresponds to vertices (points)

fem.ode—specifies ODEs and other scalar equations independent of position

Posted by on April 15, 2010 in CAE, Maths

## Common symbols in PDE terminology

The symbol is the vector differential operator (gradient), defined as

The space coordinates are denoted x1, …, xn, where n represents the number of space dimensions.

The symbol Δ stands for the Laplace operator

where β1 ,  … ,  βn are the components of the vector β.