CFD Online Discussion Forums

CFD Online Discussion Forums (
-   ANSYS Meshing & Geometry (
-   -   [Other] Exporting a mesh to read in MATLAB (

cih89 July 5, 2011 06:18

Exporting a mesh to read in MATLAB

I'm currently doing a MSc project on mesh quality. I can create the meshes in any program I like but must do the analysis of them in MATLAB (the main part of my project is to write a program that can do this).

The meshes I need to analyse must be of mixed cell type so I would like to use Ansys meshing to produce these as this is what I'm familiar with. Unfortunately I can't seem to find any file types that either the meshing program in ANSYS workbench or the ICEM cfd program can export to that can also be read by MATLAB.

Has anyone else tried to do anything like this? I need to be able to read in both 2D and 3D meshes.

Any help much appreciated.

PSYMN July 6, 2011 14:41

There are many ASCII mesh types that can be output...

You just need to work out something it MATLAB to read the files correctly.

Does MATLAB have a generic mesh format that it can already read?

cih89 July 7, 2011 08:32


I've now got an ASCII file that MATLAB can read which is great. As you say, now I've just got to work out a way of getting MATLAB to read it in a way that can store the information as I want it.

I don't believe there is a standard mesh file that MATLAB can read. MATLAB can create its own meshes but not with the types of cells that I need.

Thanks for your help though, I just need to trawl the internet for MATLAB help now instead!

djamel May 25, 2013 06:07

hello everybody
I have a problem in my program , I can't convert 3D GMSH to matlab
thank you very much

Femgineer July 18, 2013 11:57

Hi guys,
I'm trying to do something similar; create a 3D mesh in ANSYS and then export the data of said mesh to a file that I can then read using Matlab.
I have an old neutral (.neu) file from Gambit that used to hold the info of a mesh that Matlab would read but I'm having trouble exporting a similar file using ANSYS. I've tried using ICEM CFD but I keep getting errors when I'm trying to export my mesh.

While file format should I be exporting as to get something similar as to what I was getting with Gambit?

any help at all would be seriously great!


stuart23 July 18, 2013 20:47


Maybe try the Fluent .msh format. It is very well documented in the Appendix of the Fluent User Guide.


All times are GMT -4. The time now is 23:40.