cumulative product based on a series
Posted: Fri Jul 12, 2024 2:18 am
Hi all, i had a query on my mind to seek your guidance please.
suppose i have a series x = (1, 2, 3), and a series y = (1.1, 1.5, 1.9)
I wish to get a new series z with 3 elements, where z is
3* 1.1, (i.e., last element of x times 1st element of y)
3*1.1*1.5, (i.e., multiply the 1st element of z with the 2nd element of y)
3*1.1*1.5*1.9 (i.e., multiply the 2nd element of z with the 3rd element of y)
may i know how i can code up the above please?
thanks
suppose i have a series x = (1, 2, 3), and a series y = (1.1, 1.5, 1.9)
I wish to get a new series z with 3 elements, where z is
3* 1.1, (i.e., last element of x times 1st element of y)
3*1.1*1.5, (i.e., multiply the 1st element of z with the 2nd element of y)
3*1.1*1.5*1.9 (i.e., multiply the 2nd element of z with the 3rd element of y)
may i know how i can code up the above please?
thanks