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

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

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

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:

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

