Antworten (3)

Stijn Haenen
Stijn Haenen am 20 Jan. 2020

0 Stimmen

x=[1 2 -99 3 4 -99 5 6 -99];
x(x==-99)=NaN;
Steven Lord
Steven Lord am 21 Jan. 2020

0 Stimmen

Consider using the standardizeMissing function. The first example on that documentation page does exactly what you described.
VBBV
VBBV am 27 Feb. 2022
Bearbeitet: VBBV am 27 Feb. 2022

0 Stimmen

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 Kommentar

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

Melden Sie sich an, um zu kommentieren.

Kategorien

Tags

Gefragt:

am 20 Jan. 2020

Kommentiert:

am 27 Feb. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by