Filter löschen
Filter löschen

How to ignore one repeated value in a data set ?

1 Ansicht (letzte 30 Tage)
Florian
Florian am 13 Mär. 2014
Beantwortet: Doug Hull am 13 Mär. 2014
Hi all,
simple question : 1) I got a set of data in which, by default, data that have not been assimilated are equal to 999 2) I want to draw a plot of these values (rain (in mm)) as a function of time 3) When the value is equal to 999, I'd like to ignore it and go to the next one, etc.
How could I do that ?
Thanks for your help and your precious time, Best, Florian

Antworten (1)

Doug Hull
Doug Hull am 13 Mär. 2014
d = [1 2 999 4 5 7 999 8 9]
d(d == 999) = nan;
plot(d,'o-')

Kategorien

Mehr zu Statistics and Machine Learning Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by