Skip to main content
6-Contributor
February 20, 2026
Solved

Element-Wise Multiplication and Division with Column Vector Variables

  • February 20, 2026
  • 2 replies
  • 220 views

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.

Best answer by ttokoro

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

 

image.png

2 replies

ttokoro
21-Topaz I
ttokoro21-Topaz IAnswer
21-Topaz I
February 20, 2026

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

 

image.png

t.t.
thodij6-ContributorAuthor
6-Contributor
February 20, 2026

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.

25-Diamond I
February 20, 2026

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

 

thodij6-ContributorAuthor
6-Contributor
February 22, 2026

Hi,

 

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

See attached.

 

Thanks.

25-Diamond I
February 23, 2026

@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.