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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Function Evaluation

ptc-3137720
1-Newbie

Function Evaluation

Good day everyone. I'm new to Mathcad, and I need your help. I have this problem involving a function evaluation. Let's say F is a function of multiple variables, and each variable has a discrete number of values. For example: F(a,b,c)=(a+b)/c and a={1,2,3) b={3,5,6) and c={8,9,7} In my problem, F is a function of 7 variables. Using mathcad, how will I be able to solve all the possible F values? this could be easily done manually for a small number of combinations, but how about for large numbers of possible combinations. thank you very much!
8 REPLIES 8
RichardJ
19-Tanzanite
(To:ptc-3137720)

You need to use a small program with nested loops. Richard
StuartBruff
23-Emerald II
(To:RichardJ)

"Jaime Angelo Victor" wrote:

Good day everyone. I'm new to Mathcad, and I need your help. I have this problem involving a function evaluation. Let's say F is a function of multiple variables, and each variable has a discrete number of values. For example: F(a,b,c)=(a+b)/c and a={1,2,3) b={3,5,6) and c={8,9,7} In my problem, F is a function of 7 variables. Using mathcad, how will I be able to solve all the possible F values? this could be easily done manually for a small number of combinations, but how about for large numbers of possible combinations. thank you very much!

"Stuart Bruff" wrote:

As an alternative to using nested for loops, you could use an iterator to create each combination of values. Stuart (Works in M14, but for some reason that I am too tired to fathom out, M11 doesn't like the final for loop assignment).

"Stuart Bruff" wrote:

As an alternative to using nested for loops, you could use an iterator to create each combination of values. Stuart (Works in M14, but for some reason that I am too tired to fathom out, M11 doesn't like the final for loop assignment).

RichardJ
19-Tanzanite
(To:StuartBruff)

"Stuart Bruff" wrote:

As an alternative to using nested for loops, you could use an iterator to create each combination of values.

StuartBruff
23-Emerald II
(To:RichardJ)

"Stuart Bruff" wrote:

As an alternative to using nested for loops, you could use an iterator to create each combination of values.

RichardJ
19-Tanzanite
(To:StuartBruff)

"Stuart Bruff" wrote:

But, but, but .. nested loops lack Elegance. I tell you, the world's going to the dogs!

StuartBruff
23-Emerald II
(To:RichardJ)

"Stuart Bruff" wrote:

But, but, but .. nested loops lack Elegance. I tell you, the world's going to the dogs!

Announcements

Top Tags