creating a nested loop

Sep 15, 2013 at 3:17am

creating a nested loop

I am trying to get a nested loop with metro, count and uzi.
But I am finding it difficult.

In tcsh this could be:
foreach (1 2 3)
foreach (1 2 3 4)

end
end

In matlab it would be
for i = 1:3
for j = 1:4

end
end

but in Max?
See enclosed map, which does not work.

<code>

– Pasted Max Patch, click to expand. –

</code>

please help.
G

#265305
Sep 15, 2013 at 4:50am

You didn’t really say what you wanted your patch to *do*, but if I’m correct in assuming you want it to draw vertical bars of random length, then the fix is in the message ordering – hope this helps:

<code>

– Pasted Max Patch, click to expand. –

</code>

(ninja-edit that also fixes another bug in the design) (and even more compact)

#265309
Sep 15, 2013 at 9:12am

Fantastic!!!!
thank you.
G

#265315

You must be logged in to reply to this topic.