답변 (3개)

Stijn Haenen
Stijn Haenen 2020년 1월 20일

0 개 추천

x=[1 2 -99 3 4 -99 5 6 -99];
x(x==-99)=NaN;
Steven Lord
Steven Lord 2020년 1월 21일

0 개 추천

Consider using the standardizeMissing function. The first example on that documentation page does exactly what you described.
VBBV
VBBV 2022년 2월 27일
편집: VBBV 2022년 2월 27일

0 개 추천

Data = load('precip.txt'); % use load function
Data(Data == -99) = NaN
Use load function instead of readtable and try with commented line, in your snapshot code

댓글 수: 1

Stephen23
Stephen23 2022년 2월 27일
Use READMATRIX instead of LOAD.
That fact that LOAD imports a limited set of text files is really for compatilbilty with ancient MATLAB versions.

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

카테고리

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

태그

질문:

2020년 1월 20일

댓글:

2022년 2월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by