View License

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

» Watch video

Highlights from
Load BIOPAC ACQ (AcqKnowledge for PC) data

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

4.7 | 9 ratings Rate this file 28 Downloads (last 30 days) File Size: 221 KB File ID: #14562 Version: 1.3

Load BIOPAC ACQ (AcqKnowledge for PC) data


Jimmy Shen (view profile)


09 Apr 2007 (Updated )

Load BIOPAC's *.acq file (AcqKnowledge for Windows data format).

| Watch this File

File Information

"load_acq.m" will load BIOPAC's AcqKnowledge (ACQ) data to a structure containing ACQ header field and data matrix field.

It is based on Application Note #156 from BIOPAC web site (see attachment). The note mentioned that: "This document describes file formatting for all Windows versions of AcqKnowledge 3.9.x or below". Thanks to the open Python source code provided by Nathan Vack, this program can also read AcqKnowledge 4.0 & 4.1 data (with no documentation from BIOPAC). Compressed data is not supported by this program.

Usage: acq = load_acq(filename, [force_chan_by_chan_load])

acq - AcqKnowledge file structure containing ACQ header field, and data matrix.

filename - BIOPAC's AcqKnowledge file

force_chan_by_chan_load is an optional argument. By default, this optional flag will be set to 1, which means that when you use acq = load_acq(fname), the data will be loaded one channel after the other. This can avoid memory crash when you load very large ACQ data. If your ACQ data is not huge, I suggest that you set this optional flag to 0, i.e. acq = load_acq(fname, 0). In this case, the program will read data depending on the data type. If the program detects that the data type in ACQ file are different from channel to channel, it will still read data channel by channel. Otherwise, it will read whole data in one block (a lot faster than using traditional way from channel to channel with the same result).

A script called "acq2mat.m" is provided to help you convert all .acq files to .mat files in all specified folders in advance, since to load corresponding .mat files will be much quicker. i.e. In your MATLAB code, instead of using: acq = load_acq('MyGSR.acq'); you can now use: load('MyGSR.mat');


This file inspired Acqread.

MATLAB release MATLAB 5.3.1 (R11.1)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (21)
13 Mar 2016 Susan Rose

Lawliet, it is the problem of the latest version of MATLAB. I am still using old R2010 and do not have this problem.

13 Mar 2016 Lawliet Luid

I have some problem while loading acq which is
"Error: Unexpected MATLAB expression"
anyone know how to fix this? Thanks

Comment only
10 Mar 2016 Lawliet Luid

I have some problem while loading acq which is
"Error: Unexpected MATLAB expression"
anyone know how to fix this? Thanks

Comment only
30 Sep 2014 Sanjeev

I am trying to load a dataset recorded by Biopac Version 4.3 , when i am trying to load that data using acq=load_acq('data.acq_'); it shows following error
Loading data.acq_ Subscript indices must either be real positive integers or logicals.

Error in load_acq>read_acq (line 470)
mask(1:sample_divider(j):min_len, j)=1;

Error in load_acq (line 96) = read_acq(fid, acq.hdr, chan_by_chan);

Please suggest how to resolve this

Comment only
20 Jun 2012 Peter

Peter (view profile)

In acq2mat.m flip the if statement to save lots of space and time

if str2num(v7(1))<7
save(mat_fn, '-V6', 'acq');
save(mat_fn, 'acq');

23 Feb 2011 Jimmy Shen

Jimmy Shen (view profile)

Thijs, thanks to the open Python source code provided by Nathan Vack, this program can now load both ACQ4.0 and ACQ4.1. However, there is no documentation about ACQ 4 data format from BIOPAC.

Comment only
17 Feb 2011 Thijs Schrama

An Biopac ACQ4.0 version would be highly appriciated. Works great allready for 3.9.1, thanks!

15 Feb 2011 Oscar

Oscar (view profile)

Hi Nathan

Thanks for sharing the Python code.
i had to spend hours setting up python and its packages, and it was worth the effort!!! your code works excellent for AcqKnowledge 4.1.

14 Feb 2011 Jimmy Shen

Jimmy Shen (view profile)

The latest release of file format by BIOPAC is up to AcqKnowledge 3.9:
According to BIOPAC's AcqKnowledge 4 Software Guide:
It is now also able to save data into MAT-file binary format.

Comment only
13 Feb 2011 Anthi

Anthi (view profile)

hi Damien...
i am having the same problems with AcqKwoledge 4.1.Did you found a solution???

Comment only
09 Dec 2010 Damien

Damien (view profile)

hi Jimmy,

thanx a lot. There were problems with the version... I saved my file with 4.1, so the header was different...
Unfortunately BIOPAC does not support informations about 4.1 file format...

Comment only
07 Dec 2010 Nathan Vack

FYI, I've written a package in Python that'll do the .ACQ -> .MAT conversion. As far as I know, it'll handle any .ACQ file out there, including compressed files and very new ones.

It's available here:

It'll also let you work with the files in Python, of course -- but this is a Matlab site ;-)

Comment only
22 Nov 2010 Jimmy Shen

Jimmy Shen (view profile)

There are 4 places that are using 'dec2hex' command. They are: dec2hex(hdr.color_major_grid), dec2hex(hdr.color_minor_grid), dec2hex(hdr.rgb_color), dec2hex(hdr.active_seg_color).

Those values in ACQ file header are not supposed to be negative.

Since none of those values will affect the channel data, you can replace them with ' ' if you believe your ACQ data have no other problem.

Comment only
22 Nov 2010 Damien

Damien (view profile)

I've tried to use it, but it returned:
Error using ==> dec2hex
First argument must contain non-negative integers.
can u help me, please?
thanks a lot

Comment only
14 Apr 2010 Jimmy Shen

Jimmy Shen (view profile)

Hi Dino:

Theoretically, the changes that you suggested will increase the speed. However, it doesn't seem to speed up, after I tried several datasets.

Anyway, thank you very much for the feedback, and I will make the change in the next version.


Comment only
06 Apr 2010 Dino Dvorak

Great tool. Thank you.

Couple of things to fix:

line 375, add this: data = zeros(min_len, hdr.graph.num_channels);
line 409, change
data(:,i) = tmp(1:min_len);
data(1:min_len, i) = tmp(1:min_len);

02 May 2008 Alpesh Patel  
01 May 2008 Antonio Molins

Did not work for me as provided, but worked with significant changes: halted before getting to the foreign data section (missed it by 2 bytes), and did not read markers and positions. A new version has been offered to the author, and is available on request.

Comment only
08 Nov 2007 Wojtek Grabski


10 Oct 2007 boris fain

Thank you, works great.

28 Jul 2007 Aida Jimenez-Gonzalez  
13 Apr 2007

Added rgb_color interpretation, and modified description.

23 Apr 2007

Added "force_chan_by_chan_load" option and set it to 1 by default to prevent out of memory problem when loading huge ACQ data

07 May 2007

Thanks to the bug report from Stefan Schumann in University of Freiburg, now my load_acq supports new versions of data with different sample dividers.

22 May 2007

Thanks to Aida Jimenez in University of Southampton, I fixed a bug when reading AcqKnowledge version 3.5 and earlier.

01 Aug 2007

Modify on 31-JUL-2007 by Julio Cruz ( to make the program also work on MAC OS.

02 May 2008

Thanks Antonio Molins ( for the changes he made (all comments started with "AM").

02 May 2008

don't know why zip file on fileexchange is still old. upload the new one again.

10 Jun 2008

Found '&&' in last update, which cannot run under Matlab5. It has been fixed in ''.

09 Jun 2009 1.1

Fixed a bug when you use it with Matlab 6.5 and earlier.

11 Mar 2010 1.2

Fixed a bug in acq2mat.m script.

22 Feb 2011 1.3

Thanks to the open Python source code provided by Nathan Vack, this program can also read AcqKnowledge 4.0 & 4.1 data (with no documentation from BIOPAC).

Contact us