Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hi everyone,
I am experiencing two problems:
1. The classic "this value must be a matrix of scalar elements" when trying to multiply matrices. I have multiplied matrices which had complex elements before, so I am unsure why now the elements must be scalar.
2. Every matrix element below shows as {1,1}. How to show the actual values of each element instead?
Thank you.
Solved! Go to Solution.
ad 1)
Mathcad is not complaining that the values are non-real. A non-real complex number is of course considered a scalar, too. But by using "submatrix" you created not scalars but 1x1 matrices. That seems to be the problem.
Use the vector/matrix indices to access the elements of a vector/matrix and use "submatrix" if you want to create a matrix consisting of part of another one.
So instead of writing "submatrix(zp_self,1,1,2,2)" simply use "zp_self[1,2". The shortcut "[" creates a matrix index.
For more help you would have to post the worksheet as its hard to debug a picture.
ad 2)
{1,1} represents a 1x1 matrix, not a scalar. The reason why you had created that kind of structure is explained above. A matrix consisting of matrices is called nested matrix or nested array and there is an option to show them all. Assuming you are using real Mathcad 15 you either double click the resulting matrix or highlight it and chose "Format"-"Result" from the menu, go to the tab "Display Options" and check "Expand nested arrays".
ad 1)
Mathcad is not complaining that the values are non-real. A non-real complex number is of course considered a scalar, too. But by using "submatrix" you created not scalars but 1x1 matrices. That seems to be the problem.
Use the vector/matrix indices to access the elements of a vector/matrix and use "submatrix" if you want to create a matrix consisting of part of another one.
So instead of writing "submatrix(zp_self,1,1,2,2)" simply use "zp_self[1,2". The shortcut "[" creates a matrix index.
For more help you would have to post the worksheet as its hard to debug a picture.
ad 2)
{1,1} represents a 1x1 matrix, not a scalar. The reason why you had created that kind of structure is explained above. A matrix consisting of matrices is called nested matrix or nested array and there is an option to show them all. Assuming you are using real Mathcad 15 you either double click the resulting matrix or highlight it and chose "Format"-"Result" from the menu, go to the tab "Display Options" and check "Expand nested arrays".
2. Double-click the nested matrix and from the 'result format' pop-up menu, on the 'Display' tab, select "Expand nested matrix".
Success!
Luc