Page 1 of 1

For all with an if statement

Posted: Thu Jul 08, 2021 3:51 pm
by ZenSchmitt
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'

Re: For all with an if statement

Posted: Thu Jul 08, 2021 4:18 pm
by Fred
Hi,

Try

Code: Select all

loop(i$(x(i)=1), statement;);
I hope this helps!

Fred