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

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

And function in programming

AntonJelle
1-Newbie

And function in programming

I have been trying to make that can determin wich variable that has the greatest value.

I found a simple way of doing it with the if command if I only have 2 or 3 variables. but if i get to 4 or more it gets a bit more complicated.

I have thought of using the "While" command but when ever i use it Mathcad freezes. So i guss it isn n option for me.

so is there a comman that could achive the following

e= a if (a greater b) and (a greater c) and (a greater d)

or b if (b greater a) and (b greater c) and (b greater d)

or c if (c greater a) and (c greater b) and (c greater d)

or d if (d greater a) and (d greater c) and (d greater d)

or somthing to the same effect.

regards

Anton

1 ACCEPTED SOLUTION

Accepted Solutions
MikeArmstrong
5-Regular Member
(To:AntonJelle)

A few examples in the attached sheet.

Mike

View solution in original post

4 REPLIES 4

The "match(,,) will locate the duplicates as well.

MCADunk_7.gif

jmG

Do easier without programming:

without_programming.bmp

Viktor

Viktor
MikeArmstrong
5-Regular Member
(To:AntonJelle)

A few examples in the attached sheet.

Mike

Thank you for the swift help.

I was so occupied with getting the programming to work that i didnt even consider other options.

Regards

Anton

Top Tags