MATLAB Answers

Import data for Tecplot into Matlab

14 views (last 30 days)
Petr Michalek
Petr Michalek on 13 May 2020 at 11:41
Hello,
I have a .DAT file, which is an output from Fortran code and is intended to use in Tecplot for graphic display. I would like to import the .DAT file into Matlab R2017b without using Tecplot. I have tried some codes that I found here in this forum, such as LoadTecplot.m, tec2mat.m, TecplotMatlabIO, but nothing works. The codes can read only the header of the .dat file, but gives me the list of variables and no data. The data are sorted into one long column, I assume, that the variable data is in the order X, Y, rho, u, v,... etc.
The example .dat file is here:
TITLE = "2D DATA"
VARIABLES = "X","Y","rho","u","v","press","Mach","laval","entropy","T"
ZONE I= 245 J= 87 DATAPACKING=BLOCK, VARLOCATION=
(3=CELLCENTERED,4=CELLCENTERED, 5=CELLCENTERED, 6=CELLCENTERED,
7=CELLCENTERED, 8=CELLCENTERED, 9=CELLCENTERED, 10=CELLCENTERED)
0.0000000000000000D+00
0.4098360659554601D-03
0.8196721319109201D-03
0.1229508197866380D-02
0.1639344263821840D-02
0.2049180213361979D-02
0.2459016395732760D-02
0.2868852345272899D-02
0.3278688527643681D-02
0.3688524477183819D-02
0.4098360426723957D-02
0.4508196841925383D-02
...
Any ideas how to import this? Thank you.
Petr

  0 Comments

Sign in to comment.

Answers (0)

Sign in to answer this question.


Translated by