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

Using slove function inside a program

WYL-disabled
Newbie

Using slove function inside a program

Can anybody kindly answer the following questions? I have some difficulty to make my program work. The program consists a defined function and a solve function inside a program.

1. Can I use Mathcad's solve function to solve a range of variable inside a program?
2. Can I use the local assignment operator (arrow pointed to the left) to define a function inside a program?

Your help in this subject is appreciated.
5 REPLIES 5

Using slove function inside a program

Can you please post a simple Mathcad file with examples you have in mind? That would help.

CollabAdmin

Using slove function inside a program

Hi-
Attached is my example file. The function outside the program works just fine, the one inside the program got an error message. Please let me know what went wrong.

Using slove function inside a program

Using slove function inside a program

Thank You Bonnie! You solved my problem. I got another problem which related to the answers I got from the solve function. It seems not giving me the right answer at sime point. Ant idea?

WYL

Using slove function inside a program

Regrets - I won't have time to look at this with the necessary care - but bear in mind that no numerical solver is perfect. There is sensitivity to the choice of initial seed, and also (as you pointed out) the problem that nonzero imaginary parts are entering some of your solutions. Play around with a constrained solve block, say, with lots of different initial seeds and tolerance criteria. There's no substitute for coming to know your equations really well!
Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."