View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

4.8 | 12 ratings Rate this file 28 Downloads (last 30 days) File Size: 7.42 KB File ID: #6190 Version: 1.4




05 Nov 2004 (Updated )

abfload imports data in the Axon abf format (three different recording modes).

| Watch this File

File Information

abfload imports data in the Axon abf format. Data may have been acquired in the following modes:

(1) event-driven variable-length
(2) event-driven fixed-length
(3) gap-free

The major output variable d may be a 2D array, a 3D array or a cell array, depending on the recording mode. Information about scaling, the time base (that is, the sampling frequency), and the number of channels and episodes is extracted from the header of the abf file. For details, see help text of abfload.
** PLEASE NOTE: abfload can only deal with abf versions <2 (files acquired with pclamp versions <10). Use abf2load (see below) for all abf versions including the new ones.


This file inspired Abf2load.

MATLAB release MATLAB 6.5.1 (R13SP1)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (14)
09 Jan 2017 Eran Zohar

19 Feb 2014 bar

bar (view profile)

hello, thank you very useful. I want replace the old file we use by the newest version, but option 'info' look like remove. You talk about abfinfo.m in the header but I cannot found this file. Can you help me?

27 Jun 2012 Laurens Witter

Very useful utility, I use it a lot.
There seems to be a problem sometimes with clampfit generated files. The solution is to include the following after 'the hack' (~line 275):
if isempty(goodstart)
goodstart = strfind(lower(char(BigString)'),'clampfit');

Also, in the functions 'define_xxxxxxx' the use of % in names is problematic because this leads to truncated statements in the function ReadSection. Easiest solution is to take all '%' out.

With these small changes I can load all files I want.

04 Feb 2012 Rami

Rami (view profile)

26 May 2011 Praneeth Namburi

Great utility! thank you :)

19 Jan 2011 Wojciech

01 Sep 2009 D H

D H (view profile)

I partially ported this code to python, see

23 Jan 2007 B A

Great function.
It would be really useful to use 'single' (or even 'int16') variable type for loading in data. This should be more then sufficient for the 12bit encoding in abf files and would save a substantial amount of space. doubles are 64bit and I routinely run out of memory in matlab when using abfload larger files.
Suggestions are welcome.

22 Nov 2006 Yoav Mor

I have found that it is not the nDataFormat that needs to be changed to "Short", rather it is the "nADCNumChannels". Changing this to Short fixes a range of problems with reading abf files, up to version 1.83 (that's what I tested).

12 Oct 2006 Carlos E

On a related note, the latest versions of pCLAMP/Axoscope 10.x can export ABF2 files as ABF 1.8 files

Comment only
12 Oct 2006 Carlos E

The ABF variable nDataFormat is of type 'short' for version 1.8 of the ABF header. abfload uses an int and so it reads more than it should when trying to open ABF 1.8 files. Usually it just fails. Therefore if you want to open and ABF 1.8 file just change the line 'nDataFormat',100,'int',-1; to use short instead of int then it should work.

15 Jun 2006 Harald Hentschke

Please note: abfload will not work with data acquired with versions 10.x (and up) of pClamp/Axoscope because of major changes in the header structure. There is no way these changes can be accomodated as details of the header structure (which are essential for direct header access into abf files) will no longer be made publicly available.

Comment only
06 Jun 2006 Joanna Huttunen

Excellent for older types of .abf files. For files collected with Axoscope 10, it does not work... =(

25 Apr 2005 Jim Chambers

works great...I am using it to generate IV curves in real time. Very nice.

09 Nov 2004

1. Silly but fatal bug in the section for import in 'event-driven variable-length mode' (sorry)
2. Stricter input checking: an error will result if ANY of the requested channels does not exist in data file

15 Aug 2005

- bug fix (number format for two header parameters was incorrect, leading to errors during upload in rare cases)
- option to specify number format (essential on platforms other than win)
- improved upload of gap-free data (less memory consumption)

07 Dec 2006

the update of 2005-08-12 got lost or never made it to the file exchange - here it is again with minor additional improvements

20 May 2009 1.3

BSD license added, all else is the same.

17 Jun 2011 1.4

- minor bug fix (in exceedingly rare cases an error resulted reading gap-free data, namely when division of the number of points by 'chunkPtsPerChan' left no remainder)
- the help (H1) now informs on the limitation of the code to abf versions < 2.0

Contact us