cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Translate the entire conversation x

Clamping Values in a Vector or Matrix in Mathcad Prime 10

DB_9420231
2-Explorer

Clamping Values in a Vector or Matrix in Mathcad Prime 10

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!

 

 

 

 

 

 

 

 

 

 

 

 

ACCEPTED SOLUTION

Accepted Solutions

4 REPLIES 4

Capture.JPG

*face palm* on my end.

 

Thank you !

LucMeekes
23-Emerald IV
(To:DB_9420231)

Of course there are other ways.

LucMeekes_2-1755192782645.png

For vectorisation, see below.

LucMeekes_4-1755192903973.png

Succes!
Luc

 

 

 

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

Announcements

Top Tags