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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Assign a symbolic solution from Solve Block (Given/Find) to a variable

EricHong
1-Newbie

Assign a symbolic solution from Solve Block (Given/Find) to a variable

Is there a way to do what's described in the subject line? I've attached a file with an example.

1 ACCEPTED SOLUTION

Accepted Solutions

Do you mean like in the attached?

Alan

View solution in original post

8 REPLIES 8
MikeArmstrong
5-Regular Member
(To:EricHong)

Why are you solving it symbolically in the first place then?

Mike

There will much more stuffs after this. If I can somehow assign elements of the symbolic solution in the file to variables, I can use vectors as inputs to them and things will be much easier for me.

If I can do the following:

Variable := Find(Pc1_ret, Pc2_ret, A22, A44, Q22, Q44)

Pc1_ret(Ape,Apr) = Variable[0

Pc2_ret(Ape,Apr) = Variable[2

Then, I can use vectors containing min/max tolerances (as shown in the file, +/-10%). Do them to all parameters and other set of equations and at the end I'll have a flow rate tolerance band.

Of course, I can make three more copies of the same file and perform this analysis separately, but how lame!

I hope my explanation makes sense.

Thanks,

Eric

Do you mean like in the attached?

Alan

MikeArmstrong
5-Regular Member
(To:AlanStevens)

Nice example as usual with the symbolic questions.

Of regular contributes, |I definitely consider you the 'Symbolic Guru'/

Mike

Mike Armstrong wrote:

Nice example as usual with the symbolic questions.

Of regular contributes, |I definitely consider you the 'Symbolic Guru'/

Mike

Thanks Mike - I don't see myself that way!

Actually, it is often worth doing a bit of up-front work by hand rather than getting Mathcad to do everything. In my previous post the expressions for A22 and A44 are unnecessarily clumsy and prone to larger than necessary numerical errors. The attached produces neater solutions in my opinion.

Valery's approach also works here.

Alan

MikeArmstrong
5-Regular Member
(To:AlanStevens)

Very nice.

Mike

Thank you so much. I learned a lot.

Eric

GFS.pngWe can use an array for the solving same task:

Top Tags