×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# can mathcad programming be used for simultaneous equations?2

## can mathcad programming be used for simultaneous equations?

(OP)
Hi there

I was wondering if mathcad programming can be used for solving simultaneous equations?

I have "a box" that needs three simultaneous equations (non linear, algebraic) to be solved.

I should end up with two answers, A and B.

I then need to recycle answer B and feed it into the simultaneous equations again to get a new answer for A and B. This needs to continue until A and B remain constant.

Basically an iteration over "the box" with a recycle stream.

Can this be done in mathcad? perhaps with the use of excel?

I know it can be done in Matlab for example but i would like to use Mathcad...

Any ideas?
Thanks
Mark

### RE: can mathcad programming be used for simultaneous equations?

Yes I think that can be done in a couple of ways at least. If you look for Solve blocks in the help that will give you one approach.

It would probably be easiest to use the for next programming loop if you have an up to date version, failing that devious minds have solved that sort of problem by using one vector to store both variables at each iteration.

i:0;iterationsneeded*2
j:2;iterationsneeded

V[i:0
V[0:Afirstguess
V[1:Bfirstguess
V[j:some horrible equation using something like if(j=odd,workoutB using V[(j-1) and V[(j-2),workoutA)

Excel would be easier than this method.

Cheers

Greg Locock

### RE: can mathcad programming be used for simultaneous equations?

Wow thats complicated I use TK and all I have to do is enter the equations and give it a guess.

### RE: can mathcad programming be used for simultaneous equations?

(OP)
Thanks guys...

Greg i am assuming you use macros in your excel?

Not sure if it will work in a programming loop though?

### RE: can mathcad programming be used for simultaneous equations?

You don't need programming to solve simultaneous equations in Mathcad.  Greg was simply answering the mail; since you wanted something that iterated in a program.

In Mathcad, the straightforward solution uses the Given-Find or Given-Minimize block to define the simultaneous equations and then you input guess values and Mathcad produces a result.  These are described in the help and user manuals as well as tons of examples are available in the Mathcad library site or the Mathcad user forums

TTFN

### RE: can mathcad programming be used for simultaneous equations?

Why do you want it in a program loop?

The Solve block produces the solution to the constraints given.  If you want to apply that to a bunch of differing constraints, then you simply assign the Find() to a function with variables for input.

You can then run range variables into the inputs and the function will output the corresponding results, again, no programming is required.

TTFN

### RE: can mathcad programming be used for simultaneous equations?

I left off that halfway down the article is the description of assigning a function to the Find(), which then allows you to run multiple iterations of the Solve block.

TTFN

### RE: can mathcad programming be used for simultaneous equations?

There are some good examples of solving things like this in a download from the mathcad website (I got it from the Mathcad 11 user area - requires registration).

Bung
Life is non-linear...

### RE: can mathcad programming be used for simultaneous equations?

Chemicallymark

TK Solver is the original Equation Solver it's is used by a lot of Chemical Engineers. I believe the Dupont Standards For Chemical Process and Equipment are done in TK.

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

#### Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a partâ€™s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!