[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: export variables to vtk or similar
From: |
Fabian Braennstroem |
Subject: |
Re: export variables to vtk or similar |
Date: |
Sat, 28 Jun 2008 20:28:06 +0200 |
User-agent: |
slrn/0.9.8.1pl1 (Debian) |
Hi,
it seems that my last post did not arrive at the list...
I got it working using the tecplot format writing the
variables each to one file, deleting the top lines
using 'sed', merge the files column-wise using 'paste'
and adding a simple head for the tecplot format. Worked
pretty nice, but is there a chance to write the
variables in columns at once and remove the comments!?
* Fabian Braennstroem <address@hidden> wrote:
> Hi Jordi,
>
> * Jordi GutiƩrrez Hermoso <address@hidden> wrote:
>> 2008/6/27 Fabian Braennstroem <address@hidden>:
>>> I would like to export variables in a mat file to some
>>> other format like vtk, silo or ensight.
>>>
>>> The structure of the mat file looks like this:
>>>
>>> vx vz y mg vy x z
>>
>> So a mat file has 8 columns?
> Yes.
>
>>
>>>
>>> Where vx, vz, vy and mg are scalars and x,z,y are the corresponding
>>> positions.
>>> All variables have the same structure:
>>>
>>> octave:3> size(vx)
>>> ans =
>>>
>>> 61 256 60
>>
>> It's not hard to do your own formatting in this case, if I understand
>> you correctly. It may be helpful to use vx(:) to squeeze all of vx
>> into a column. Then you could do something like
>>
>> save foo.mat [vx(:), vz(:), z(:), mg(:), vy(:), x(:), z(:)]
>>
>> You would have to remove the comments from foo.mat if the .mat format
>> doesn't support comments with #.
>
> Thanks for your help! The problem is that I need the data in
> some other format than .mat; I hoped, that there exist some
> function, for exporting the coordinates and scalars to a
> common cfd format!?
>
> Greetings!
> Fabian
Greetings!
Fabian