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

1-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
15-Moonstone
(To:ptc-4451268)

Like the attached?

Alan

13 REPLIES 13
15-Moonstone
(To:ptc-4451268)

Like the attached?

Alan

1-Newbie
(To:AlanStevens)

Hi Alan,

Thats excellent!

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

15-Moonstone
(To:ptc-4451268)
 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

5-Regular Member
(To:AlanStevens)

Nice work Alan

4-Participant
(To:AlanStevens)

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.

4-Participant

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

15-Moonstone

How about the attached?

Alan

4-Participant
(To:AlanStevens)

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

5-Regular Member

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

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

15-Moonstone

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

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

15-Moonstone
(To:AlanStevens)
 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

23-Emerald I