Skip to main content
1-Visitor
August 14, 2025
Solved

Clamping Values in a Vector or Matrix in Mathcad Prime 10

  • August 14, 2025
  • 2 replies
  • 968 views

hello:

 

I am relatively new to Mathcad and rusty on how matrices work within the program haha. I am trying to clamp a minimum value in a 5x1 vector in a spreadsheet i am generating for wind loads.

 

I have a for loop  that generates a 5x1 vector for one variable

 

DB_9420231_0-1755180699502.png

 

To which i use GCpnegzone4 5x1 to generate wind pressures in the following loop

 

DB_9420231_1-1755180773292.png

 

Which works... however i need to clamp the values to a minimum of -16psf per code. meaning it should look like this:

 

DB_9420231_3-1755180840977.png

 

the approach i have been using is taking the same for loop used for Pnegzone4 and adding a the min function in hopes that it will go by element and compare the min value and replace when necessary. However the code just reports the lowest value as show below:

 

DB_9420231_4-1755180946255.png

 

Any help on how it should look like would be appreciated! my file is attached

 

Thank you in advance!

 

 

 

 

 

 

 

 

 

 

 

 

Best answer by terryhendicott

Capture.JPG

2 replies

21-Topaz II
August 14, 2025
1-Visitor
August 14, 2025

*face palm* on my end.

 

Thank you !

23-Emerald IV
August 14, 2025

Of course there are other ways.

LucMeekes_2-1755192782645.png

For vectorisation, see below.

LucMeekes_4-1755192903973.png

Succes!
Luc

 

 

 

1-Visitor
August 14, 2025

Thank you for the second option as well! This will help me grow as a user of mathcad so I really appreciate the help