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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Write a program to solve 3 simultaneous equations?

ptc-4451268
7-Bedrock

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!!!

ACCEPTED SOLUTION

Accepted Solutions

Like the attached?

Alan

View solution in original post

13 REPLIES 13

Like the attached?

Alan

Hi Alan,

Thats excellent!

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

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

Nice work Alan

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.

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

How about the attached?

Alan

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

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

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

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

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

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

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

Announcements

Top Tags