For all with an if statement

Im looking to do

for all i,

if(x(i) = 1, statement;);

How do I implement this?

Right now, I’m getting the ‘Uncontrolled set entered as constant’

Hi,

Try

loop(i$(x(i)=1), statement;);

I hope this helps!

Fred