Skip to main content
Werner_E
Werner_EAnswer
25-Diamond I
Jul 30, 2025 6:24 PM UTC

In case you need it more often to limit a value or a vector of values between two limits, you may use a small utility function.

Werner_E_2-1753900087490.png

 

In your case you have to use vectorization and use the limits zero and infinity.

Werner_E_1-1753899829564.png

In case you use units, don't forget to apply the appropriate units to the limits as well (even if its infinity).

 

Of course you always can use programming (even thought it may be considered overkill here

Werner_E_4-1753900326176.png

And even though I don't like this kind of approach, what you can do with for loops most often also could be done using range variables:

Werner_E_5-1753900557716.png

 

Prime 9 sheet attached

 

 

 

 

4 replies

19-Tanzanite
Jul 30, 2025 6:14 PM UTC

Here's one way:

 

Pos.png

Translate
SFares14-AlexandriteAuthor
14-Alexandrite
Aug 2, 2025 3:08 PM UTC

Thank you, Alan!

Translate
Werner_E
Werner_E25-Diamond IAnswer
25-Diamond I
Jul 30, 2025 6:24 PM UTC

In case you need it more often to limit a value or a vector of values between two limits, you may use a small utility function.

Werner_E_2-1753900087490.png

 

In your case you have to use vectorization and use the limits zero and infinity.

Werner_E_1-1753899829564.png

In case you use units, don't forget to apply the appropriate units to the limits as well (even if its infinity).

 

Of course you always can use programming (even thought it may be considered overkill here

Werner_E_4-1753900326176.png

And even though I don't like this kind of approach, what you can do with for loops most often also could be done using range variables:

Werner_E_5-1753900557716.png

 

Prime 9 sheet attached

 

 

 

 

Translate
SFares14-AlexandriteAuthor
14-Alexandrite
Aug 2, 2025 3:08 PM UTC

Thank you for the different alternatives. Werner!

I used your solution.

Translate