reference
API Reference › Gamry DTA Files
labkit.dta.loadFiles
Read a list of Gamry DTA files.
Syntax
[items, report] = labkit.dta.loadFiles(filepaths)
[items, report] = labkit.dta.loadFiles(filepaths, expectedKind)
[items, report] = labkit.dta.loadFiles(filepaths, expectedKind, opts)Description
Calls loadFile for each path in input order. Successful items are returned in items; failures do not stop the batch and are recorded in report. The positions in items therefore need not match the positions in filepaths; use report.statuses when per-input correspondence matters.
Inputs
filepaths- One character-vector or string-scalar path, a string array, or a cell array of character vectors and string scalars. An empty input is allowed and returns an empty report.
expectedKind- "auto", "chrono", "eis", or "cvct", with the same normalization as loadFile. Default: "auto".
opts- Optional scalar structure forwarded unchanged to loadFile.
Options
pulseMode- Pulse-detection mode used for chrono files. See detectPulses for the legal labels and normalization behavior.
pulseOptions- Scalar structure accepted by detectPulses. When both pulseOptions and pulseMode are present, pulseOptions takes precedence.
Outputs
items- Cell row vector containing successfully loaded item structures in input order, with failed inputs omitted.
report- Scalar structure summarizing every requested path.
Output Fields
loaded- Cell array of paths that loaded successfully.
failed- Structure array with filepath, kind, and message for failures.
statuses- One loadFile status structure per requested input, in input order.
nRequested- Number of input paths.
nLoaded- Number of successful items.
nFailed- Number of failed inputs.
Errors
Throws labkit:dta:InvalidFilepaths or labkit:dta:InvalidFilepath when the path collection contains unsupported values, and labkit:dta:InvalidKind for an unsupported expectedKind. Individual file read failures are stored in report instead of thrown.
Example
files = ["run-01.DTA", "run-02.DTA"];
[items, report] = labkit.dta.loadFiles(files, "chrono");
fprintf("Loaded %d of %d files.\n", report.nLoaded, report.nRequested)Related APIs
labkit.dta.loadFile— Read one supported Gamry DTA file.labkit.dta.findFiles— Find DTA files in a folder and its subfolders.labkit.dta.loadFolder— Read every DTA file below a folder.labkit.dta.detectPulses— Locate cathodic and anodic pulse windows in chrono data.labkit.dta.detectType— Identify the supported Gamry DTA data family in a file.labkit.dta.getColumn— Extract a named column from a parsed DTA table.labkit.dta.getCurveXY— Extract paired X and Y data from a parsed CV/CT curve.labkit.dta.getMainCurve— Select the transient table containing T, Vf, and Im data.
Source
This page is generated from the MATLAB help text in +labkit/+dta/loadFiles.m.