[Help] If and ifelse condition

조회 수: 3 (최근 30일)
Waqar Ali Memon
Waqar Ali Memon 2019년 7월 25일
댓글: Waqar Ali Memon 2019년 7월 25일
Hello Everyone,
I have clipped the AC_Data for reference.
I want to define two conditions, if in column 3, value of cell is 0.0, the following rows should be equal to 0 and if 1.0 comes than the value of following cells should be 1.0 until 0.0. it should follow.
But i don't know how to code this. I tried finding empty cells but i don't know how to limit code for above two conditions.
Any help would be appreciated :-)
Regards,
Waqar Ali Memon

채택된 답변

Andrei Bobrov
Andrei Bobrov 2019년 7월 25일
load('AC_Data.mat');
T = cell2table(AC);
T.AC3 = str2double(T.AC3);
T_out = fillmissing(T,'previous');
  댓글 수: 1
Waqar Ali Memon
Waqar Ali Memon 2019년 7월 25일
Thank you so much Andrei Bobrov, it works :-)

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

추가 답변 (0개)

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by