reference
labkit.biosignal.getChannel
Return one signal from a recording by display name or index.
Syntax
signal = labkit.biosignal.getChannel(recording, channel)Description
Selects one channel from a recording created by labkit.biosignal.readRecording. A numeric channel is interpreted as a 1-based index. Text is matched exactly against displayName first and then against the source name. Matching is case-sensitive.
Use labkit.biosignal.listChannels to obtain the display names presented by the recording. Display names are unique even when source channel names are repeated.
Inputs
recording- Recording structure returned by
labkit.biosignal.readRecording. channel- Positive integer index, character vector, or scalar string containing a channel name or display name.
Outputs
signal- Selected signal structure. Its principal fields are time in seconds, values, fs in hertz, name, displayName, unit, and metadata.
Errors
labkit:biosignal:InvalidRecording- recording has no signals field.
labkit:biosignal:NoChannels- recording contains no signals.
labkit:biosignal:InvalidChannelIndex- numeric index is not an integer within the available range.
labkit:biosignal:InvalidChannel- channel has an unsupported type.
labkit:biosignal:UnknownChannel- no exact name matches channel.
Example
channel = struct('name', "ECG", 'displayName', "ECG", ...
'time', [0; 0.01], 'values', [0; 1], 'fs', 100, ...
'unit', "mV", 'metadata', struct());
recording = struct('signals', channel);
signal = labkit.biosignal.getChannel(recording, "ECG");Related APIs
labkit.biosignal.listChannels— Return display names for all channels in a recording.labkit.biosignal.readRecording— Read a biosignal file into a standard recording struct.labkit.biosignal.buildTemplate— Build a representative segment template.labkit.biosignal.compareGroups— Summarize groups and compute pairwise Welch comparisons.labkit.biosignal.cropSignal— Return a signal clipped to a time range in seconds.labkit.biosignal.defaultEcgPeakOptions— Return documented defaults for ECG/QRS peak detection.labkit.biosignal.detectEcgPeaks— Detect ECG/QRS peaks as event anchors.labkit.biosignal.filterSignal— Apply a zero-phase FFT-domain filter to a biosignal.
Source
This page is generated from the MATLAB help text in +labkit/+biosignal/getChannel.m.