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?

 채택된 답변

Jan
Jan 2017년 8월 5일
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

Thanks for your help
YUXUAN CHEN
YUXUAN CHEN 2017년 8월 8일
편집: Walter Roberson 2017년 8월 9일
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.
Hi thanks for all of you.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

deng xifei
deng xifei 2017년 8월 5일

0 개 추천

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

Thanks for your help
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.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Numeric Types에 대해 자세히 알아보기

질문:

2017년 8월 5일

댓글:

2017년 8월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by