Showing posts with label FreeMat. Show all posts
Showing posts with label FreeMat. Show all posts

Friday, March 29, 2013

Using m-functions in FreeMat

FreeMat is a free environment for rapid engineering and scientific prototyping and data processing. It is similar to commercial systems such as MATLAB from Mathworks.

If you don't have FreeMat installed, you can refer here how to get FreeMat.

The folder where you save the m functions should be defined in FreeMat path.

Step 1, Open pathtool in FreeMat:
The tool to integrate m-function folder in FreeMat is pathtool.


(a) Open FreeMat and type pathtool and Enter. Alternatively you can open the path tool window from the menu  Tool > Path Tool
(b) Find the folder where you save your m files (for example m-functions) on the left box, then select  Add, Save then confirm it by pressing Done.

Step 2, Restart FreeMat:
Restart FreeMat to completely integrate the m files path.


After restarting FreeMat, it can access and use the m files located in the folder (in this example the name of the folder is m-functions).

Sunday, January 22, 2012

Using Finite Element Toolbox CALFEM in FreeMat

FreeMat is a free environment for rapid engineering and scientific prototyping and data processing. It is similar to commercial systems such as MATLAB from Mathworks.
CALFEM is a free interactive computer program for teaching the finite element method (FEM). The name CALFEM is an abbreviation of "Computer Aided Learning of the Finite Element Method".

Although CALFEM was designed as a MATLAB toolbox, CALFEM can be integrated and used in FreeMat.
Below the steps to integrate CALFEM into FreeMat.

Step 1, FreeMat installation:
 Install Freemat from Ubuntu Software Center or
 from the terminal sudo apt-get install freemat

 A windows installer can be downloaded from FreeMat download link, then install as a normal installation procedure in Windows machine.

Step 2, CALFEM installation:
CALFEM zip file (CALFEM-3.4.zip) should be downloaded from its sourceforge repository. You need to unzip it.

Put in a folder of your preference and unzip it. Just right click and select extract here.

Put in a folder of your preference and unzip it by using unzip software available in your windows machine.

Step 3, Integrating CALFEM into FreeMat:
All the program routines of CALFEM must be recognized in FreeMat. The folder where CALFEM is saved should be defined from pathtool.

(a) Open FreeMat and type pathtool and Enter
(b) Find the location where you unzip CALFEM on the left box, then select  Add With Subfolders.
(c) Confirm the selection by pressing Done, then you need to save changes. Restart FreeMat to completely define the new CALFEM pathtool.

Step 4, Test CALFEM function in FreeMat:
You should be able to use CALFEM functions in FreeMat.
Type bar1e(50) and press Enter.
If FreeMat can recognize one of functions, bar1e, it means CALFEM has been properly integrated in your FreeMat. Now you can employ other FEM functions defined by CALFEM.