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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Function Evaluation

ptc-3137720
1-Visitor

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 III
(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).

StuartBruff
23-Emerald III
(To:ptc-3137720)

"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 III
(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 III
(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