Skip to main content
15-Moonstone
August 18, 2023
Solved

Calculation with range variables

  • August 18, 2023
  • 2 replies
  • 1716 views

Hello.

 

I am having troubles with the outputs when the range variable "n" is used (file attached).

The range variable is defined from 2 to 6 with the step of 1. So there are 5 elements in 5x1 matrix.

But at some point during the calculation I get more than 5 outputs (parameters L_e, A_e, X_e, I_e and Pg.

What did I do wrong in my spreadsheet? I will appreciate any feedback.

 

Best regards, Sergey

 

 

 

Best answer by terryhendicott

Hi Sergey,

Never confuse a range index with a vector of scalar values.  A range is not a variable it is an index.

Have substituted ni as the range index for addressing or indexing the values in the n scalar column vector variable

Cheers

Terry

 

2 replies

21-Topaz II
August 18, 2023

Hi Sergey,

Never confuse a range index with a vector of scalar values.  A range is not a variable it is an index.

Have substituted ni as the range index for addressing or indexing the values in the n scalar column vector variable

Cheers

Terry

 

Sergey15-MoonstoneAuthor
15-Moonstone
August 18, 2023

Thank you, Terry.

 

I get what I did wrong. Will make sure to remember it.

 

Best regards, Sergey

ttokoro
21-Topaz I
21-Topaz I
August 18, 2023

image.pngimage.png

t.t.
Sergey15-MoonstoneAuthor
15-Moonstone
August 18, 2023

Thank you, sir.