Carry prior cell forward until there is a new value

1 回表示 (過去 30 日間)
IDN
IDN 2021 年 11 月 26 日
コメント済み: IDN 2021 年 11 月 27 日
I have a vector with possible 1,0,-1 as answers, each cell is the output of a statement/function. What I want is the following....If prior row is 0, then 1 can occur, and after 1 occurs i need it to continue populating rows below until statement outputs a -1 (also therefore -1 can only occur if prior row is 1).
  8 件のコメント
IDN
IDN 2021 年 11 月 27 日
no issue with loop, let me try!
IDN
IDN 2021 年 11 月 27 日
Thats it, thanks so much for taking the time to help me out!

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by