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

Write a program to solve 3 simultaneous equations?

SOLVED
Highlighted
Newbie

Write a program to solve 3 simultaneous equations?

Hello!

I have attached my worksheet.

I have three equations and three unknowns, however instead of using the Find() in mathcad, I must write a program to solve for one of the unknowns iteratively. I am very unfamiliar with writing programs. Can somebody help me?

Thank you!!!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Write a program to solve 3 simultaneous equations?

Like the attached?

Alan

View solution in original post

13 REPLIES 13
Highlighted

Re: Write a program to solve 3 simultaneous equations?

Like the attached?

Alan

View solution in original post

Highlighted

Re: Write a program to solve 3 simultaneous equations?

Hi Alan,

Thats excellent!

how in the world do I learn how to do this myself?

Highlighted

Re: Write a program to solve 3 simultaneous equations?

david h wrote:

...

how in the world do I learn how to do this myself?

Go to Help, Quicksheets, Programming and look at the tutorial and examples.

Alan

Highlighted

Re: Write a program to solve 3 simultaneous equations?

Nice work Alan

Highlighted

Re: Write a program to solve 3 simultaneous equations?

How about if you need to solve for two unknowns, can this be done with programming to avoid needing to cycle the process manually? See attached.

Highlighted

Re: Write a program to solve 3 simultaneous equations?

So long since I did this can't remember how to attach a file! Here it is:-

Highlighted

Re: Write a program to solve 3 simultaneous equations?

How about the attached?

Alan

Highlighted

Re: Write a program to solve 3 simultaneous equations?

That's brilliant, Alan, thankyou. It will take me a while to absorb what you have done, and so quickly, too. My mind seems to be still fixed in BASIC mode, I keep reaching for the GOTO when programming in mathcad.

Bill

Highlighted

Re: Write a program to solve 3 simultaneous equations?

There is a good thread here which you might want to read through.

http://communities.ptc.com/message/198385#198385

Highlighted

Re: Write a program to solve 3 simultaneous equations?

I've just realised there is an error in the "while" condition in cable_2b.

while.PNG

The former has an AND between the two conditions, which means it will be bypassed if only one delta meets the condition but the other one doesn't. You need an OR, as in the latter, so that the while loop continues as long as either or both deltas are too big.

Alan

Highlighted

Re: Write a program to solve 3 simultaneous equations?

ALAN STEVENS wrote:

I've just realised there is an error in the "while" condition in cable_2b.

I've corrected the error and also tidied up some other parts of the logic in the attached.

Alan

Highlighted

Re: Write a program to solve 3 simultaneous equations?

There was a whole lot of effort put into catenaries not long ago. Might be helpful here.

Highlighted

Re: Write a program to solve 3 simultaneous equations?

Thanks again for everybodies help! I hope to be proficient in programming one day.

Announcements