Consider a region-of-interest (ROI) table mask with four regions of interest spanning samples numbered from 2 to 19. Specify the category labels as A, B, and C. Use the mask to create a signalMask object.
Shorten the regions of interest by one sample from the right and extend them two samples to the left. Extract the modified mask, specifying a sequence length of 16 samples.
Example: signalMask(table([2 4;6 7],["male" "female"]')) specifies a
signal mask with a three-sample male region and a two-sample
female region.
Example: signalMask(categorical(["" "male" "male" "male" "" "female" "female"
""]',["male" "female"])) specifies a signal mask with a three-sample
male region and a two-sample female
region.
Example: signalMask([0 1 1 1 0 0 0 0;0 0 0 0 0 1 1 0]','Categories',["male"
"female"]) specifies a signal mask with a three-sample
male region and a two-sample female
region.
len — Output sequence length integer scalar
Output sequence length, specified as an integer scalar. Regions beyond
len are ignored. The output matrix of binary sequences
seqs is padded with false values in these cases:
SourceType is 'categoricalSequence' or
'binarySequences' and len is greater
than the length of the source sequence.
SourceType is 'roiTable' and
len is greater than the maximum region index.
Matrix of binary sequences mask, returned as a matrix. The ith
column of seqs contains a binary mask sequence for the
ith category listed in the SelectedCategories property of msk.
If SourceType is 'categoricalSequence' or
'binarySequences' and len is not
specified, then seqs has the same length as the source mask
sequence.
If SourceType is 'roiTable', then
len must be specified.
When RightExtension is nonzero and SourceType is 'categoricalSequence' or
'binarySequences', binmask extends regions
possibly beyond the sequence length, applies all other modifications based on LeftExtension, LeftShortening, RightShortening, MergeDistance, and MinLength, and then truncates the resulting sequence to the original
sequence length, or to the specified length len.
For more information on how the properties of msk affect the
length of seqs, see Region Limit Modification.
numroi — Number of regions vector of integers
Number of regions found for each of the categories in cats, returned as a
vector of integers.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.