gap size
USAGE: sz=gapsize(x)
EXAMPLE:
x=rand(20,1);
x(x>.5)=nan;
[x gapsize(x)]
--------------
ans =
NaN 2
NaN 2
0.33311 0
0.28511 0
0.38263 0
0.20227 0
0.37058 0
0.43658 0
NaN 1
0.0049841 0
NaN 1
0.015303 0
NaN 1
0.26592 0
NaN 4
NaN 4
NaN 4
NaN 4
0.20113 0
NaN 1
Cite As
Aslak Grinsted (2026). gap size (https://uk.mathworks.com/matlabcentral/fileexchange/31982-gap-size), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Language Fundamentals > Data Types > Numeric Types > NaNs >
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
