Skip to main content
1-Visitor
October 19, 2022
Solved

indices problem

  • October 19, 2022
  • 3 replies
  • 2341 views

Hello...just started back into MC and have a question re; this error I'm getting re: a summation:
Why does is it say the variable is undefined when it IS defined? what am i missing?
I enclosed a snapshot of what i'm talking about
Thanks for any help?

Best answer by Werner_E

Would this help?

Werner_E_0-1666216559643.png

 

3 replies

25-Diamond I
October 19, 2022

Its always better to attach the worksheet itselft rather than just a picture.

 

Are you aware that Prime uses two different types of indices - literal indices and vector/matrix indices?

Chances are that you used the wrong ones.

 

A vector index is just an integer. So you could not use something like z.k1 but rather would use z.10*k+1

Furthermore you have to know that if you define z.11:=... you are defining a 12 element vector (assuming you have not changed the value of ORIGIN which is 0 by default). Unless you have them defined before, all other elements of the vector z (z.0, z.1 ... z.10) are set to zero.

1-Visitor
October 19, 2022

ok..so I should use the literal version then?..how do i access/implement that? I just used "operators"--> and picked the one with the
subscript matrix index. 
Sorry about the pic..i was hoping that would be clear..

25-Diamond I
October 19, 2022

No, the vector/matrix indices would be the correct ones to use, but it could not be seen from the pic which you used where.

So again, upload the sheet for further help.

24-Ruby III
October 19, 2022

Please upload your Mathcad Prime worksheet here.

Werner_E25-Diamond IAnswer
25-Diamond I
October 19, 2022

Would this help?

Werner_E_0-1666216559643.png

 

1-Visitor
October 20, 2022

Thanks alot Werner.. I appreciate it..it now gives me something to work with.