One condition for multiple variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
One condition for multiple variable
Hi
How to solve for multiple variable with one condition?
for example: how to solve this problem using mathcad program, I use mathcad prime 3.0
if n>2
m=x+y+z
n=x+y
p=x-y-z
else
m=x*y*z
n=x*y
p=x*y/z
I know how to solve one variable with multiple conditions using "if condition" in Mathcad. i.e
m=if n>2 then.........if else.........else............
In this example I have accommodated few conditions for one variable. But in above program, there is one condition for few variables. and I don't want to use separate "if conditions" for each of the variable. I want to use one condition for each variable in one formula/block, if possible.
Thanks
Jahangir Hossain
Solved! Go to Solution.
- Labels:
-
Physics
- Tags:
- mathcad prime*
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Jahangir Hossain wrote:
Hi
How to solve for multiple variable with one condition?
for example: how to solve this problem using mathcad program, I use mathcad prime 3.0
if n>2
m=x+y+z
n=x+y
p=x-y-z
else
m=x*y*z
n=x*y
p=x*y/z
I know how to solve one variable with multiple conditions using "if condition" in Mathcad. i.e
m=if n>2 then.........if else.........else............
In this example I have accommodated few conditions for one variable. But in above program, there is one condition for few variables. and I don't want to use separate "if conditions" for each of the variable. I want to use one condition for each variable in one formula/block, if possible.
I've got Prime 3.1, so posting the worksheet wouldn't be of much use to you, as Prime 3.1 files are not compatible with Prime 3.0.
Stuart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks Fred
It helped me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Jahangir Hossain wrote:
Hi
How to solve for multiple variable with one condition?
for example: how to solve this problem using mathcad program, I use mathcad prime 3.0
if n>2
m=x+y+z
n=x+y
p=x-y-z
else
m=x*y*z
n=x*y
p=x*y/z
I know how to solve one variable with multiple conditions using "if condition" in Mathcad. i.e
m=if n>2 then.........if else.........else............
In this example I have accommodated few conditions for one variable. But in above program, there is one condition for few variables. and I don't want to use separate "if conditions" for each of the variable. I want to use one condition for each variable in one formula/block, if possible.
I've got Prime 3.1, so posting the worksheet wouldn't be of much use to you, as Prime 3.1 files are not compatible with Prime 3.0.
Stuart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
... or use Fred's functional version of Method 3!
Stuart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you Stuart for your effort.
