5.0

5.0 | 8 ratings Rate this file 116 downloads (last 30 days) File Size: 9.59 KB File ID: #20609

Read DBF files

by Brian Madsen

 

08 Jul 2008 (Updated 17 Feb 2009)

No BSD License  

DBFREAD reads numeric, float, character and date data and field names from a .DBF file.

Download Now | Watch this File

File Information
Description

DBFREAD is a data import function supporting DBF files. DBF files are often used as one-shot data files rather than the more traditional role of a database to store and retrieve compiled data.
This work is based on functionality initially developed for the Mapping Toolbox by Rob Comer.

MATLAB release MATLAB 7.6 (R2008a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (8)
31 Jul 2008 Clayton Hiles

Converts a .dbf to a cell array. Exactly what I needed!

07 Aug 2008 Omer O

Allowed me to join multiple files with a simple script, which I was not able to do in other programs. This is a great program!! KUDOS Brian!!

30 Aug 2008 C Schwalm

Excellent! A simple interface with DBF data that should be part of standard Matlab. One suggestion:

Change [name '.dbf'] to [pathstr filesep name '.dbf']

Otherwise it's hard to point to files...

17 Sep 2008 Dav Jones

Very good

05 Nov 2008 Anthony Kendall

Works very well!

30 Jan 2009 Chaopeng

Hi Brian, I tried to use your dbfread to read a file. There were 98 columns in the file but after your script returned 120 columns. I checked it and found that some of the numeric fields have been duplicated. I don't know why. Anyways. Thanks for sharing!

30 Jan 2009 Chaopeng

Hi brian I found out why. It was because when exporting a file from xls to dbf, some fields get assigned the same field name due to truncation. I guess I should have given your 5 stars but whoops can't change that right now..

29 May 2009 Ola Olsson

Great. This seems to save us a lot of work! One comment, though: It appears that the function requires a dBase IV format dbf-file. Some software (e.g. MS FoxPro) do not use that format (but still .dbf) as standard but can easily export to it.

Please login to add a comment or rating.
Updates
17 Sep 2008

Fixed a bug that appeared when numeric fields have space-padded zeroes, and included the path string in the file open command to make it possible to point to files not on the MATLAB path.

17 Feb 2009

Modified a data assignment call to support the R13 6.5.2 release of MATLAB. Thanks to Dr. Patrick Haas of the Institute of Meteorology, BOKU - Vienna for his suggestion.

17 Feb 2009

Modified an assignment call to support the R14 6.5.2 release of MATLAB. Thanks to Dr. Patrick Haas of the Institute of Meteorology at BOKU - Vienna for the suggestion.

Tag Activity for this File
Tag Applied By Date/Time
data import Brian Madsen 22 Oct 2008 10:09:22
data export Brian Madsen 22 Oct 2008 10:09:22
dbase Brian Madsen 22 Oct 2008 10:09:22
database Brian Madsen 22 Oct 2008 10:09:22
dbf Brian Madsen 22 Oct 2008 10:09:22
utilities Brian Madsen 22 Oct 2008 10:09:22
data Brian Madsen 22 Oct 2008 10:09:22
import Brian Madsen 22 Oct 2008 10:09:22
export Brian Madsen 22 Oct 2008 10:09:22
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com