Getting multiples of a number

Jan 14, 2013 at 2:46pm

Getting multiples of a number

I want to get the first 16 multiples of a number. Off course I can use the * object but that takes 16 times that object. is there a quicker way to do this?

#66064
Jan 14, 2013 at 3:08pm

Hello,

Do you mean { x * 1, x * 2, x * 3, … , x * 16 } ?

#237837
Jan 14, 2013 at 3:31pm

How about this?

– Pasted Max Patch, click to expand. –

Cheers,
Ádám

#237838
Jan 14, 2013 at 3:37pm

or that ;-)

– Pasted Max Patch, click to expand. –
#237839
Jan 14, 2013 at 3:44pm

If you care about CPU efficiency, both are more or less equals.

#237840
Jan 15, 2013 at 9:50am

Thanks! I took Siska’s option because I need a list to work with.

#237841
Jan 15, 2013 at 10:40am

Hi,

actually, Nicolas’s can also output lists, besides, it’s more easier to generalize for an arbitrary number of multiples than mine:

– Pasted Max Patch, click to expand. –

Cheers,
Ádám (feel free to call me on my first name ;-) )

#237842
Jan 15, 2013 at 11:03am

Hi,

It seems that [vexpr] solution (patch above) is a little bit less efficient ; but not so much (30 % on my computer) so it’s really a matter of taste.

– Pasted Max Patch, click to expand. –
#237843
Jan 15, 2013 at 2:02pm

Thanks both of you!

#237844
Jan 15, 2013 at 3:03pm

i would use [accum]

#237845

You must be logged in to reply to this topic.