File Exchange

image thumbnail

Freefem to matlab

version 1.0 (23.8 KB) by

A tool to import Freefem meshes into matlab.



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 !

Comments and Ratings (3)

Gilgamesh is a flash of genius

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
MATLAB 7.8 (R2009a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today