Discussion:
Iteration in MathCAD
(too old to reply)
R***@gmail.com
2005-11-13 19:12:33 UTC
Permalink
I'm using MathCAD to solve a free convection problem via an iterative
process. In Excel the "Goal Seek" function is handy for this or, if
stability is a concern, I usually put the guess cell right next door
the calculated cell and grind through the process manually until the
two converge.

I set up a MathCAD sheet to do the calc however the guess is at the top
of the sheet and the calculated cell is several pages later so I guess,
scroll, check, scroll, guess, etc. until I converge. Quite tedious!

Obviously I can't move the calculated value to the top of the sheet,
but is there any way I can set things up so I can view the calculated
value on the same page as the guess?

Thanks,
Russ D.
Timo de Beer
2005-11-13 21:27:49 UTC
Permalink
If you don't require to see all intermediate steps, you could collapse the
calculation loop (with "insert area"), so that input and output are right
below each other.

Timo
Post by R***@gmail.com
I'm using MathCAD to solve a free convection problem via an iterative
process. In Excel the "Goal Seek" function is handy for this or, if
stability is a concern, I usually put the guess cell right next door
the calculated cell and grind through the process manually until the
two converge.
I set up a MathCAD sheet to do the calc however the guess is at the top
of the sheet and the calculated cell is several pages later so I guess,
scroll, check, scroll, guess, etc. until I converge. Quite tedious!
Obviously I can't move the calculated value to the top of the sheet,
but is there any way I can set things up so I can view the calculated
value on the same page as the guess?
Thanks,
Russ D.
Greg Locock
2005-11-14 06:44:25 UTC
Permalink
Post by R***@gmail.com
I'm using MathCAD to solve a free convection problem via an iterative
process. In Excel the "Goal Seek" function is handy for this or, if
stability is a concern, I usually put the guess cell right next door
the calculated cell and grind through the process manually until the
two converge.
I set up a MathCAD sheet to do the calc however the guess is at the top
of the sheet and the calculated cell is several pages later so I guess,
scroll, check, scroll, guess, etc. until I converge. Quite tedious!
Obviously I can't move the calculated value to the top of the sheet,
but is there any way I can set things up so I can view the calculated
value on the same page as the guess?
Which version of MathCAD?
d***@dodgeit.com
2005-11-14 16:48:34 UTC
Permalink
1) Set up your variable definitions, a:=2, b:=5, c:=4
2) Input your guess values in the same way, x:=1.0, y:=1.0, z:=0.0
3) Set up a "Solve Block", look in the MathCad help for more details.
The block starts with the "Given" statement and end with the "Find"
statement. The equations to be solved are inside the block and written
as symbolic equations with the Bold Equal Sign (entered as Ctrl+=).

Given
a*x + y = b - a*z^2
y^3 + c*z = c
x*y + z = e^z
Solution:=Find(x,y,z)

The variable, Solution, now contains the results of the Find statement
as a vector.

To get the individual values from vector:
x := Solution[0
y := Solution[1
z := Solution[2

The "[" operator denotes a vector component - when typed it looks like
a subscript.

Dave Parker
Post by R***@gmail.com
I'm using MathCAD to solve a free convection problem via an iterative
process. In Excel the "Goal Seek" function is handy for this or, if
stability is a concern, I usually put the guess cell right next door
the calculated cell and grind through the process manually until the
two converge.
I set up a MathCAD sheet to do the calc however the guess is at the top
of the sheet and the calculated cell is several pages later so I guess,
scroll, check, scroll, guess, etc. until I converge. Quite tedious!
Obviously I can't move the calculated value to the top of the sheet,
but is there any way I can set things up so I can view the calculated
value on the same page as the guess?
Thanks,
Russ D.
Loading...