Skip to main content
1-Visitor
May 3, 2013
Solved

Using minimize() for multiple input vectors

  • May 3, 2013
  • 2 replies
  • 1349 views

This is theoretical at this point, so I do not have an example spreadsheet.

If I want to use minimize() on 4,000 input vectors (the input vectors helps determine constraint values, so different input vectors result in different outputs) do I have to use the programming functionality of MathCad to loop through the input vectors one at a time or there some way that I can feed in all 4,000 vectors it once and have it return 4,000 answers at once?

Best answer by Werner_E

Jeremy Belsher wrote:

This is theoretical at this point, so I do not have an example spreadsheet.

Nevertheless you should have provided a sample worksheet to demonstrate what you are after and show the version of Mathcad you use. It makes it easier for people to answer your question that way.

What you want to achieve as I understand it can be done without programming by using Mathcad's vectorization.

First set up a parameterized solveblock with an input vector as parameter

min_vec_1.png

then define a nested vector of input vectors

min_vec_2.png

and now you can call your function, vectorize the call and Mathcad will loop through V and return a vector with the different solutions

min_vec_3.png

2 replies

Werner_E
Werner_E25-Diamond IAnswer
25-Diamond I
May 4, 2013

Jeremy Belsher wrote:

This is theoretical at this point, so I do not have an example spreadsheet.

Nevertheless you should have provided a sample worksheet to demonstrate what you are after and show the version of Mathcad you use. It makes it easier for people to answer your question that way.

What you want to achieve as I understand it can be done without programming by using Mathcad's vectorization.

First set up a parameterized solveblock with an input vector as parameter

min_vec_1.png

then define a nested vector of input vectors

min_vec_2.png

and now you can call your function, vectorize the call and Mathcad will loop through V and return a vector with the different solutions

min_vec_3.png

belsherj1-VisitorAuthor
1-Visitor
May 4, 2013

Thanks. I think that this will work.