Internal Matlab function not found (isnan)
조회 수: 3 (최근 30일)
이전 댓글 표시
From the command window (but also in scripts) I get the following.
K>> ans = isnan(bSteadyX);
'isnan' is not found in the current folder or on the MATLAB path, but exists in:
/Applications/MATLAB_R2022a.app/toolbox/matlab/elmat
Change the MATLAB current folder or add its folder to the MATLAB path.
K>> addpath '/Applications/MATLAB_R2022a.app/toolbox/matlab/elmat'
K>> ans = isnan(bSteadyX);
'isnan' is not found in the current folder or on the MATLAB path, but exists in:
/Applications/MATLAB_R2022a.app/toolbox/matlab/elmat
Change the MATLAB current folder or add its folder to the MATLAB path.
K>> cd '/Applications/MATLAB_R2022a.app/toolbox/matlab/elmat'
K>> ans = isnan(bSteadyX);
Unrecognized function or variable 'isnan'.
But if run the live script provided in the help documents ...
Replace NaN Elements
Create an array and find the elements with NaN values.
A = [1,3,5,7,NaN,10,NaN,4,6,8]
A = 1×10
1 3 5 7 NaN 10 NaN 4 6 8
TF = isnan(A)
TF = 1×10 logical array
0 0 0 0 1 0 1 0 0 0
So isnan works just fine from a live script but not from the command window.
댓글 수: 0
답변 (2개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Numeric Types에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!