Community Tip - You can change your system assigned username to something more personal in your community settings. X
Hi there
I have a problem with this function . The issue is R is a cumulative value so the R2=R0+R1>
R3= R0+R1+R2 and so on... I wanted to implement that in this function but an error ( must be a vector ) shows
Is there a way to fix this or to write it differently
Thanks
The sheet is attached prime 11
Hi Werner
Is this value calculating the sum of the layers before?
Thanks
@YA_10963798 wrote:
Hi Werner
Is this value calculating the sum of the layers before?
I have no idea WHAT this expression calculates, but it definitely calculates a sum of products of values based on previous R-calculations. We are calculating Ri+1, so Ri already exists as long as we define R1 somewhere in front of the loop.
You original approach
would not have calculated any sum (apart from the fact that it tried to use value not even existing at the time of calculation). Mi and Ri are simple scalar values and so is their product. There is nothing to sum up.
It's like writing
There is nothing to sum up (would need vectors, not scalars) and Prime even throws an error in that case (I would have expected the result 12).
