extendsigroi
Description
extends the signal regions of interest specified in roilimsout
= extendsigroi(roilims
,sl
,sr
)roilims
to the left
by sl
samples and to the right by sr
samples.
Examples
Extend Regions of Interest
Consider a two-column matrix of integers that can represent regions of interest of a signal. Extend the regions of interest by two samples to the left and three samples to the right. extendsigroi
does not extend regions to the left beyond the first sample.
rois = [1 8; 17 20; 27 31; 38 40]; xrois = extendsigroi(rois,2,3)
xrois = 4×2
1 11
15 23
25 34
36 43
Extend Overlapping Regions of Interest
Consider a two-column matrix of integers that can represent overlapping regions of interest of a signal. Extend the regions of interest by two samples to the left and three samples to the right. extendsigroi
does not extend regions to the left beyond the first sample.
rois = [1 10; 17 26; 24 32; 38 40]; xrois = extendsigroi(rois,2,3)
xrois = 4×2
1 13
15 29
22 35
36 43
Input Arguments
roilims
— Region-of-interest limits
two-column matrix of positive integers
Region-of-interest limits, specified as a two-column matrix of positive integers. The
ith row of roilims
contains nondecreasing
indices corresponding to the beginning and end samples of the ith
region of interest of a signal.
Example: [5 8; 12 20; 18 25]
specifies a two-column region-of-interest
matrix with three regions.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
sl
— Number of samples to extend to the left
nonnegative integer
Number of samples to extend to the left, specified as a nonnegative integer.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
sr
— Number of samples to extend to the right
nonnegative integer
Number of samples to extend to the right, specified as a nonnegative integer.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
Output Arguments
roilimsout
— Modified region-of-interest limits
two-column matrix of positive integers
Modified region-of-interest limits, returned as a two-column matrix of positive integers.
Output limits are returned in sorted order using the sortrows
function.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
GPU Arrays
Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
This function fully supports GPU arrays. For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).
Version History
Introduced in R2020b
See Also
Objects
Functions
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
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.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)