cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Translate the entire conversation x

Must be a factor

YA_10963798
14-Alexandrite

Must be a factor

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 

YA_10963798_0-1768299322575.png

Thanks 

The sheet is attached prime 11 

3 REPLIES 3
Werner_E
25-Diamond I
(To:YA_10963798)

Not sure if these are the values you need

Werner_E_0-1768305136148.png

 

YA_10963798
14-Alexandrite
(To:Werner_E)

Hi Werner 

Is this value calculating the sum of the layers before?

YA_10963798_0-1768305456978.png

Thanks 

 

Werner_E
25-Diamond I
(To:YA_10963798)


@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

Werner_E_0-1768306038136.png

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

Werner_E_1-1768306321941.png

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).

 

 

Announcements

Top Tags