Code covered by the BSD License  

Highlights from
Binary reader for PZFlex .flxhst input files

Be the first to rate this file! 6 Downloads (last 30 days) File Size: 3.6 KB File ID: #33812

Binary reader for PZFlex .flxhst input files

by Kevin

 

17 Nov 2011 (Updated 09 Feb 2012)

Function designed to read data files from PZFlex into MATLAB

| Watch this File

File Information
Description

This code runs through the data array twice, initially to parse the FORTRAN records to ensure the integrity of the data, and then to read in the data. The function automatically determines the difference between 32-bit and 64-bit data. Additionally, calling the function without an input argument will open a dialogue box which prompts the user to select a file.

The header structure contains general information about the file as well as the time record header information. The dataheader structure contains the specific information about each data record. The Times array is an (n x 1) element array where the n is the number of time steps and the Data array is an (n x m) array where m is the number of data records.

Known Issues: The output array Data will always be a double precision array as the preallocation is not varied depending on the bit resolution of the file. Although this doubles the memory usage for the variable uneccesarily it is considered that this is unlikely to present a problem, while using an if statement could negatively impact the speed of the code.

Tested with PZFlex build 2.4-2011-02-24-1 64-bit Linux and PZFlex Build: 3.0-2012-01-05-1 - Linux 64-bit

Required Products MATLAB
MATLAB release MATLAB 7.13 (2011b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
09 Feb 2012

Updated help to include the explanation of the header fields.

Tested under PZFlex Build: 3.0-2012-01-05-1 - Linux 64-bit.

Tag Activity for this File
Tag Applied By Date/Time
data import Kevin 17 Nov 2011 15:59:51
simulation Kevin 17 Nov 2011 15:59:51
modeling Kevin 17 Nov 2011 15:59:51
data import Dimitri Ackermann 28 Feb 2012 03:31:26

Contact us at files@mathworks.com