Undefined function 'ismissing' for input arguments of type 'double'.

When I was practicing 'ismissing', there was an error, shown below:
A = [3 NaN 5 6 7 NaN NaN 9]; TF = ismissing(A)
Undefined function 'ismissing' for input arguments of type 'double'.
How can I deal with it?

 Accepted Answer

The function ismissing was introduced in 2013b. See https://www.mathworks.com/help/matlab/ref/ismissing.html, at the bottom. You can find such information by asking an internet search engine for "Matlab ismissing".
Workaround:
A = [3 NaN 5 6 7 NaN NaN 9];
TF = isnan(A)

5 Comments

Hi Jan Simon
I can see the function, 'ismissing' in matlab support.
But I can not find the 'isnan' that your example use.
How can I know the function's name in the different matlab version?
In 2017 matlab, Its name is ismissing.
In 2013b matlab, Its name is isnan.
isnan is an important Matlab command and it is included in R2017a also, see https://www.mathworks.com/help/matlab/ref/isnan.html. You can find a link to the docs also, when you scroll down in the doc of ismissing and look into the "See also" line.
The MathWorks care for the backward compatibility of Matlab functions. There is a very small number of commands and features, which have been removed. You find such changes in the Release Histroy in the documentation. In many docs, it is mentioned now, when the function was introduced. But the list of changes could be more detailed.

Sign in to comment.

More Answers (1)

Hi
you should know that the type of input variable for function ismissing should be dataSet, not a vector. And you are trying to take a matrix as the input, so you get the error tips.

2 Comments

This advice is not correct. ismissing() is defined for at least the following data types:
  • double, single;
  • char, string, cell of character vectors;
  • duration, calendarDuration, datetime;
  • categorical
and possibly others.

Sign in to comment.

Categories

Asked:

on 5 Aug 2017

Commented:

on 10 Aug 2017

Community Treasure Hunt

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

Start Hunting!