next up previous contents
Next: Modal Element Data Up: NetCDF Output Format Previous: NetCDF Output   Contents

Subsections

Accessing the Database

The database can be accessed using any of the tools listed at the web site
http://www.unidata.ucar.edu/software/netcdf/software.html
(yes, including MBDyn itself...)

Octave

The octcdf package, available from
http://ocgmod1.marine.usf.edu/,
provides a clean interface to using NetCDF databases from within the popular math environment Octave. Results from MBDyn can be easily handled once the data structure is known.

To access the database, a handler needs to be obtained by calling

    octave:1> nc = netcdf('mbdyn_output.nc', 'r');
Variable descriptions are accessed as
    octave:2> nc{'node.struct.1000.X'}
Their values are accessed as
    octave:3> nc{'node.struct.1000.X'}(10, 3)
So, for example, the z position of node 1000 can be plot with
    octave:4> plot(nc{'run.time'}(:), nc{'node.struct.1000.X'}(:,3))



MBDyn: MultiBody Dynamics Software
Document version: 1.X-Devel
Last update: Wed Oct 28, 2009
Maintained by mbdyn@aero.polimi.it