Skip to main content
6-Contributor
Feb 20, 2026 5:06 AM UTC
Solved

Element-Wise Multiplication and Division with Column Vector Variables

Hello PTC Community.

 

I am posting a Mathcad Prime 11.0.1.0 worksheet wherein I am evaluating certain quantities by performing element-wise multiplication and division of column vector variables. I believe that I am not doing this right.

Your help will be appreciated.

In MATLAB, it is .* & ./ for element-wise multiplication and division, respectively.

Both the attached Mathcad & Excel sheets work together.

 

Thank you for your assistance.

ttokoro
ttokoroAnswer
21-Topaz I
Feb 20, 2026 8:26 AM UTC

Vectorization makes evry T  calculation. But nor sure what you want to do.

 

image.png

t.t.

12 replies

ttokoro
ttokoro21-Topaz IAnswer
21-Topaz I
Feb 20, 2026 8:26 AM UTC

Vectorization makes evry T  calculation. But nor sure what you want to do.

 

image.png

Translate
t.t.
thodij6-ContributorAuthor
6-Contributor
Feb 20, 2026 2:20 PM UTC

Excellent! I can always count on my PTC community Brothers and Sisters to share their knowledge and take the time to provide feedback.

 

Thank you.

Translate
Werner_E
25-Diamond I
Feb 20, 2026 9:23 AM UTC

As ttokoro already had shown, what you are looking for is called "vectorization" in Mathcad and Prime.>

B0.png

Vectorization is applied if you want a scalar calculation to be done with vectors element-wise. All involved vectors must have the same size and vectorization does not work recursively.

Prime applies vectorization automatically if the operation is not defined for vectors. So when v is a vector (in Prime only column vectors are considered vectors), Prime applies implicit vectorization if you type v2 but uses the scalar vector product when you use v*v.

Exponentiation (and likewise division) is not defined for vectors, so instead of issuing an error message, Prime automatically applies vectorization. While this is a convenient approach, it also means that, as in the example below for a*a/b, one might initially assume that the calculation is being performed element by element and continue to compute with incorrect results.

B1.png

 

Translate
thodij6-ContributorAuthor
6-Contributor
Feb 22, 2026 11:28 PM UTC

Hi,

 

Now I wonder why the expressions for ge, QBL, and QFL are grayed out!

See attached.

 

Thanks.

Translate
Werner_E
25-Diamond I
Feb 23, 2026 12:09 AM UTC

@thodij wrote:

Hi,

 

Now I wonder why the expressions for ge, QBL, and QFL are grayed out!

See attached.

 

Thanks.



Looks like you turned off automatic calculation and are in manual calculation mode. So when an expression is edited, the sheet does not update automatically but the edited region and all regions depending on it are greyed out to indicate that they may not show the correct current value.

Once you recalculate the sheet or turn auto calculation on again the regions should update.

 

Translate