Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hello Everyone,
The question is : Is there a reason Mathcad 14 doesn't accept (3) ?
Thanks in advance for your time and help.
Regards.
Solved! Go to Solution.
The problem is that you want to do a matrix operation followed by a vectorized operation. i.e you want to multiply a 3x3 matrix by a 3x1 vector to get a 3x1 vector, and then you want to multiply that 3x1 vector by another 3x1 vector, element by element. You can't make that work by vectorizing it, because then (as Stuart notes) the first operation fails. You also can't make it work by not vectorizing it, because then you get a scalar answer, and the comparison fails. So the only way to do it is a two step process.
Loi Le wrote:
Hello Everyone,
The question is : Is there a reason Mathcad 14 doesn't accept (3) ?
Thanks in advance for your time and help.
Regards.
Yes. Vectorization can only take place when the arrays have the same number of rows and columns. You've got a 3x3 trying to vectorize multiplication with two 3x1 arrays, so Mathcad won't permit it.
Vectorizing two 3x3s is just fine.
Stuart
The problem is that you want to do a matrix operation followed by a vectorized operation. i.e you want to multiply a 3x3 matrix by a 3x1 vector to get a 3x1 vector, and then you want to multiply that 3x1 vector by another 3x1 vector, element by element. You can't make that work by vectorizing it, because then (as Stuart notes) the first operation fails. You also can't make it work by not vectorizing it, because then you get a scalar answer, and the comparison fails. So the only way to do it is a two step process.
Thanks for your time and help, Stuart and Richard. With your explanation I have got what I want . Many thanks for this.
Best Regards.