Adds data to be written in an ABF file. The data is grouped as part of the last created subcase, if any.

## Syntax

R = abfadddata(fid, type, request, component, vector)

R = abfadddata(fid, type, request, component, vector, unittype, unit)

## Inputs

fid
Integer representing the file ID.
Type: double | integer
type
A string containing the name of the data type.
Type: char | string
request
A string containing the name of the data request.
Type: char | string
component
A string containing the name of the data component.
Type: char | string
vector
A vector containing the data.
Type: vector
unittype
Type of the unit (this is optional).To get valid unit types, use getunittypelist.
Type: char | string
unit
Name of the unit (this is optional). Must be given if unit type is given. To get valid units, use getunitlist.
Type: char | string

## Outputs

R
Numerical equivalent true/false.

## Example

% Example abfadddata
file = 'c:/work/abftest.abf'
fid = createabffile(file);
abfsetversion(fid,11.0);

% Create the vectors for export. These must be declared as 'global'
x1 = [1:10];
y1 = sin(x1);
x2 = [10:10:100];
y2 = cos(x2);

% Each pair will be grouped in a subcase (this is optional)
ret = abfcreatesubcase(fid, 'subcase 1');
if(ret == false)
error('Error creating subcase 1');
end

% Adds the 1st set of vectors to the above subcase and assigns required field names
t=readvector(file,'subcase 1','type1', 'req1','comp2')
file = c:/work/abftest.abf
0.84147  0.90930  0.14112  -0.75680  -0.95892  -0.27942  0.65699  0.98936  0.41212  -0.54402