Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Having trouble here understanding why the red box shows up with the "These array dimensions do not match." error message.
For the best help, you should attach the Prime worksheet and state which version of Prime you are using...
The multiplication of two row vectors is not defined. You can multiply a row with a column vector to get a matrix. But I guess you're not looking for that.
If all you want is to simply multiply the successive elements of the two row vectors, you should vectorise the multiplication expression.
Select M*X and then take the vectorise symbol from the (lower right corner of the) Math -> Operators menu, to see if that works wonders.
Success!
Luc
Simple, your matrices should be vertical. We both structural engineers me thinks.
@LN_11054923 I just added this example to show the usefulness of arrays for structural calcs.
I would recommend for most of your structural calcs that you work with data in arrays (vertical matrices). That is also helpful so that you can enter your data in a table, like in a BOM or like how you would normally enter data in an Excel sheet. Arrays will be your friend!
In this example, I know what external loads I will be placing on a structure but it will be constructed in stages. So I use a matrix of ones and zeros—or fractions for partial loads—to calculate all the stages at the same time.
The arrow is "vectorization" and accessed by Ctrl-Shift-^. That does an element-by-element calculation. Otherwise a 'dot' will do 'dot product' of two arrays..
I guess that you are expecting just a single scalar result, correct?
The vector dot product is only supported for column vectors. Row vectors are seen as 1 x n matrices in Prime and the multiplication of two matrices is only defined when the number of columns in the first matrix equals the number of rows in the second matrix - hence the error message.
If you insist on using row vectors instead of column vectors you have to use the transpose operator.
So write MT*XT instead of M*X to make Prime use the vector dot product.
It would also suffice to only transpose X, because M*XT will be calculated as the matrix product of a 1x11 matrix with a 11x1 matrix.
This matrix product actually should return a 1x1 matrix but in Prime the result is not a matrix but a simple scalar.
And of course a third option is to use the vectorization operator (resulting in a 1x11 matrix as shown in ppal's reply) followed by the summation operator.
Here are the three proposed ways using some dummy data
I second what Luc said - whenever possible always attach the worksheet itself and say which version of Prime you are using.
Hi @LN_11054923,
I wanted to see if you got the help you needed.
If so, please mark the appropriate reply as the Accepted Solution. It will help other members who may have the same question.
Of course, if you have more to share on your issue, please pursue the conversation.
Thanks,
Anurag