Skip to main content
13-Aquamarine
September 19, 2025
Question

min and max of a vector

  • September 19, 2025
  • 3 replies
  • 673 views

How can I determine the maximum absolute value of a vector, but have the result appear with its corresponding sign?. 

Thanks to the community for your attention.

DC_11916766_0-1758249550414.png

 

3 replies

23-Emerald V
September 19, 2025

Here are a couple of options ...

 

2025 09 19 B.png

 

Mathcad Prime 10 worksheet attached.

 

Stuart

21-Topaz II
September 19, 2025

Hi,

I took a different tack without the programming.

Cheers

Terry

 

23-Emerald I
September 19, 2025

In Express 4, should work in student:

Fred_Kohlhepp_1-1758279525636.png

 

Community Moderator
September 26, 2025

Hello @DC_11916766,

 

It looks like you have some responses from our community champions. If any of these replies helped you solve your question please mark the appropriate reply as the Accepted Solution. 

Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Vivek N.
Community Moderation Team.

25-Diamond I
September 19, 2025

Here are my 2 cents worth...

 

Like Terry I wondered what you would like to chose in case positive and negative values with the same absolute magnitude exist.

 

Here are some suggestions:

Werner_E_1-1758288331239.png

 

P.S.: The method also works well in the free Prime Express. But because Express does not offer programming, we would have to change the "magnitudes" function in Express and do without the local variable "absv":

Werner_E_0-1758288668470.png

 

 

Prime 11 sheet attached