Find and replace value

조회 수: 5 (최근 30일)
Hamed Hedayatnia
Hamed Hedayatnia 2020년 4월 22일
답변: Ameer Hamza 2020년 4월 22일
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
Hamed Hedayatnia
Hamed Hedayatnia 2020년 4월 22일
yes, of course
Hamed Hedayatnia
Hamed Hedayatnia 2020년 4월 22일
values in data_sum_daily.Var1 should be considered.

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

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 4월 22일
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');

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by