Effacer les filtres
Effacer les filtres

Carry prior cell forward until there is a new value

1 vue (au cours des 30 derniers jours)
IDN
IDN le 26 Nov 2021
Commenté : IDN le 27 Nov 2021
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 commentaires
IDN
IDN le 27 Nov 2021
no issue with loop, let me try!
IDN
IDN le 27 Nov 2021
Thats it, thanks so much for taking the time to help me out!

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by