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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Using minimize() for multiple input vectors

belsherj
1-Newbie

Using minimize() for multiple input vectors

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

2 REPLIES 2

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

Thanks. I think that this will work.

Top Tags