This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.


Minimum ignoring NaNs


m = nanmin(X)
[m,ndx] = nanmin(X)
m = nanmin(X,Y)
[m,ndx] = nanmin(X,[],DIM)



Financial times series object.


Financial times series object or scalar.


Dimension along which the operation is conducted.


nanmin for financial times series objects is based on the Statistics and Machine Learning Toolbox™ function nanmin. See nanmin.

m = nanmin(X) returns the minimum of a financial time series object X with NaNs treated as missing. m is the smallest non-NaN element in X.

[m,ndx] = nanmin(X) returns the indices of the minimum values in X. If the values along the first nonsingleton dimension contain multiple elements, the index of the first one is returned.

m = nanmin(X,Y) returns an array the same size as X and Y with the smallest elements taken from X or Y. Only Y can be a scalar double.

[m,ndx] = nanmin(X, [], DIM) operates along the dimension DIM.


To compute nanmin for the following dates:

dates = {'01-Jan-2007';'02-Jan-2007';'03-Jan-2007'};
f = fints(dates, magic(3));
f.series1(1) = nan;
f.series2(3) = nan;
f.series3(2) = nan;

[nmin, minidx] = nanmin(f)
nmin =
     3     1     2
minidx =
     2     1     3

Introduced before R2006a

Was this topic helpful?