I am working with a time table and wanna replace values==0 or less than i.e:800 with the value of the day before. how can i do it?

3 commentaires

Ameer Hamza
Ameer Hamza le 22 Avr 2020
Can you share a small sample of your table in a mat file?
Hamed Hedayatnia
Hamed Hedayatnia le 22 Avr 2020
yes, of course
Hamed Hedayatnia
Hamed Hedayatnia le 22 Avr 2020
values in data_sum_daily.Var1 should be considered.

Connectez-vous pour commenter.

 Réponse acceptée

Ameer Hamza
Ameer Hamza le 22 Avr 2020

1 vote

Try this
load('data_sum_rad.mat');
data_sum_daily.Var1(data_sum_daily.Var1==0) = nan;
data_sum_daily.Var1 = fillmissing(data_sum_daily.Var1, 'previous');

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange

Produits

Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by