Skip to main content
1-Visitor
September 22, 2014
Solved

Solving equations using using arrays

  • September 22, 2014
  • 2 replies
  • 4297 views

The attached contains an expression I wish to use in a solver to determine x-amount of constants (the Q's) from a system of an equal amount of equations and unknowns (the constants). The problem in mathcad arises when I'm using multiple (two) arrays within the solve block.

Best answer by RichardJ

As already suggested, get rid of the summation and the indexing.

2 replies

25-Diamond I
September 22, 2014

You will have to specify a value for n first.

You will also have to provide at least a sample for the vector u and the square matrix lamda.Q so we have soemthing to play with.

25-Diamond I
September 22, 2014

Can it be that you are looking for something like the attached?

EDIT: Of course you can get the result much easier using the inverse:

1.png

swahlgren1-VisitorAuthor
1-Visitor
September 22, 2014

Something like that but I need to include summation over one of the indices.

Untitled.png

"Funny" thing is I got it working a few minutes ago but the Mathcad shut down spontaneously and I can't get it working again. The error message is:"This variable is undefined"

25-Diamond I
September 22, 2014

What you set up with your sum is exactly the multiplication of the matrix lamda.Q with the vector Q - thats the reason I posted my sheet in the last message.

The error messages in solve blocks are misleading - you will always get that "undefined variable", no matter what the real cause is. Right klick at the error message and chose "Trace Error" to get at least a message which may be a bit more useful.