Skip to main content
1-Visitor
Jun 17, 2015 9:17 PM UTC
Solved

Minimize between vector and a single value

Is it possible to create a minimize function comparing each entry of a vector to a single number and then outputting a vector with each entry being the smaller of the two valves? The attempts in the attached worksheets (Prime 3.1 and Mathcad 15) only find the minimum between the entire vector and single value instead of comparing them line by line.

 

RichardJAnswer
19-Tanzanite
Jun 17, 2015 10:09 PM UTC

3 replies

RichardJ19-TanzaniteAnswer
19-Tanzanite
Jun 17, 2015 10:09 PM UTC
dsochor1-VisitorAuthor
1-Visitor
Jun 17, 2015 10:40 PM UTC

Thank you Richard! Can this es function be made into a function of c: es(c)?

Translate
19-Tanzanite
Jun 17, 2015 11:06 PM UTC

Your function definition is fine. The solve block fails because there is no value of c that makes the sum equal to zero.

Translate