help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: export variables to vtk or similar


From: Jordi Gutiérrez Hermoso
Subject: Re: export variables to vtk or similar
Date: Fri, 27 Jun 2008 14:52:37 -0500

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?

>
>   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 #.

HTH,
- Jordi G. H.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]