File Exchange

image thumbnail

Freefem to matlab

version (23.8 KB) by Julien Dambrine
A tool to import Freefem meshes into matlab.


Updated 03 Mar 2010

View License

The function [p e t]=importfilemesh(<name>) reads <name> and creates the corresponding matlab-pde formatted mesh (p, e, t) that can be handeled with the matlab pde toolbox.
The function u=importfiledata(<name>) reads <name> and creates the corresponding matlab node data (u) that can be handeled with the matlab pde toolbox.

The file "freefem_example.edp" generates two files :
- A freefem-formatted mesh : "Gilgamesh.mesh"
- A node data file : ""
The example file shows how to read the mesh and node data generated by "freefem_example.edp", and how to plot them.

Enjoy !

Cite As

Julien Dambrine (2021). Freefem to matlab (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (3)

Francesco Sborgia

Gilgamesh is a flash of genius

Erraji Elmahdi

I just need to understand how it work in tree dimension envirenment.


After to save the freefem mesh I saved the vectorial solution:

ofstream file("");
file << "2 1 1 "<< u1[].n << " 2 \n";
for (int j=0;j<u1[].n ; j++)
file << u1[][j] <<" "<< u2[][j] << endl;

Now I need to plot velocity vectors as arrows with components (u,v) at the points (x,y).

could you give a example how to do that? Do you have any m-file? Thanks!

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!