gap size

Calculates number of consequtive NaNs in a vector.
236 Descargas
Actualizado 1 jul 2011

Ver licencia

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

Citar como

Aslak Grinsted (2025). gap size (https://es.mathworks.com/matlabcentral/fileexchange/31982-gap-size), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R14
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre NaNs en Help Center y MATLAB Answers.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versión Publicado Notas de la versión
1.1.0.0

FIX: Allow row-vectors.

1.0.0.0