Login  Register

Apply multiplication to all elements in an array

Posted by wei.jian on Aug 31, 2017; 3:47am
URL: http://imagej.273.s1.nabble.com/Apply-multiplication-to-all-elements-in-an-array-tp5019299.html

Hi there,

I'm new to coding and can someone guide or direct me to how I can multiply a
constant (say 5) to an array of elements:

For e.g. a = newArray(0,1,2,3,4);

I wish to get another array whereby: b = 0, 5, 10, 15, 20

Thanks.
WJ



--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html