Find and replace value

5 visualizaciones (últimos 30 días)
Hamed Hedayatnia
Hamed Hedayatnia el 22 de Abr. de 2020
Respondida: Ameer Hamza el 22 de Abr. de 2020
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 comentarios
Hamed Hedayatnia
Hamed Hedayatnia el 22 de Abr. de 2020
yes, of course
Hamed Hedayatnia
Hamed Hedayatnia el 22 de Abr. de 2020
values in data_sum_daily.Var1 should be considered.

Iniciar sesión para comentar.

Respuesta aceptada

Ameer Hamza
Ameer Hamza el 22 de Abr. de 2020
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');

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by