# Import/interpolate data from MatLAB to FreeFEM++

**URL:** <https://community.freefem.org/t/import-interpolate-data-from-matlab-to-freefem/1405>\
**Category:** General Discussion\
**Created:** [December 31, 2021, 3:10pm UTC](https://community.freefem.org/t/import-interpolate-data-from-matlab-to-freefem/1405 "2021-12-31T15:10:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://community.freefem.org/u/Robert)\
**Post date:** [December 31, 2021, 3:10pm UTC](https://community.freefem.org/t/import-interpolate-data-from-matlab-to-freefem/1405/1 "2021-12-31T15:10:04Z")

</div>

Dear forum,

First of all, I wish a Happy New Year to everyone. Secondly, thank you for sharing the discussions from FreeFEM++ days for those who couldn’t attend live.

I want to perform a stability analysis on a 2D geometry using the flow exported from another program. I made the 2D mesh in Salome. I exported this mesh as GMF ASCII file with the .mesh extensions but I can’t read it in FreeFEM++ using:

> Blockquote  
> load “medit”  
> mesh Th = readmesh(“X.mesh”);  
> Blockquote

I looked in the mesh file and it seems It also exports a third dimension component equal to 0. I tried to read it using

> Blockquote  
> load “medit”  
> load “msh3”  
> mesh3 Th = readmesh3(“X.mesh”);  
> Blockquote

For a full 3D mesh I have no problems in importing it. I also tried some suggestions found in older posts on the forum, by reading using gmshload and still no solution.

Meanwhile, I interpolated a velocity field on this 2D mesh in MatLAB so I couldnt export from there the X and Y coordinates pair with the corresponding velocity. I was wondering, is there a way to import the X and Y coordinates from MatLAB and create the mesh again in FreeFEM++ and interpolate the velocity field exported from MatLAB inside FreeFEM++? Any guidance or hints would be much appreciated.

Thank you. Best regards,  
Robert
