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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

how to extract a symbolic result from a find function

anthonyQueen
8-Gravel

how to extract a symbolic result from a find function

Using (still) Mathcad 11, I am unable to find a solution under this setting.

I have a block similar to this:

given

y = a*x+b

y = c*x+d

Find(x,y) --> (RISULT1, RISULT2) <--- here the response is a vertical vector in Mathcad.

How do I extract RESULT1, and RESULT2 by assigning a variable so I can use them in other equations?

I tried to apply an example that I found in the book "Engineering with Mathcad":

(Resl01, Resl02) := Find(x,y) <--- here also the vector is a column.

In my symbolic case hovewer it did not work.

Thanks for any help.

Anthony

1 ACCEPTED SOLUTION

Accepted Solutions

Unfortunately I don't have a Mathcad 11 installed to try with that version. I am working with MC15 and am only saving in MC11 format. There were a lot of changes since MC11 and the symbolic engine was changed (from Maple to MuPad).

In MC15 what you tried works if the symbolic eval is used after the assignment.

SolveEqu3.png

It may be that it doesn't work that way in MC11 but I guess you could use Fred's appoach like this

SolveEqu4.png

View solution in original post

9 REPLIES 9

See attached.

In my symbolic case hovewer it did not work.

It should work the way you describe it. You will get an error and one of the variables in the left hand side vector will be red, but this error is thrown by the numeric processor.

In which way you would like to use the expressions saved to variables?

I included Fred's suggestion in the attached file in case you cannot read his file with your Mathcad 11

symbolic_find2.png

Many thanks @Fred and @Werner.

In Mathcad with my Find function is in fact all red, not just the Y (as in your helpful example).

Moreover I was making the mistake of writing afterwards (in vertical)

(X, Y) =... , expecting the symbolic result and therefore missing the typical arrow (-->).

Yet I am still stucked. After assigning values to:

a:=1, b:=2, c:=3, but not to parameter d which is left as variable.

I would have liked to assign still to x the result I obtained:

x(d):=(b-d)/(a-c)

Yet I did not find a way to make it work. Writing x(d):=X gives error: "function not defined above". Is there a way to write this assignment x(d):= with the symbolic result of X?

Your example, Werner, in my case fY(2,4,5,1)=6 seems not working either.

Many thanks again.

Unfortunately I don't have a Mathcad 11 installed to try with that version. I am working with MC15 and am only saving in MC11 format. There were a lot of changes since MC11 and the symbolic engine was changed (from Maple to MuPad).

In MC15 what you tried works if the symbolic eval is used after the assignment.

SolveEqu3.png

It may be that it doesn't work that way in MC11 but I guess you could use Fred's appoach like this

SolveEqu4.png

In Prime we can see more results of symbolic math than in M15. We can scroll answer. Try please.

Valery Ochkov wrote:

In Prime we can see more results of symbolic math than in M15. We can scroll answer. Try please.

Ahhh, yes! But Anthony wrote that he is still using Mathcad11 and we have in no way the problem of symbolic expressions being too large here.

BTW, can we really scroll the expression in Prime? The last time I tried was with P2 and scrolling was not possible there. Was there a change from P2 to P3? As far as I am aware we can and have to enlarge the expression window to the right until the whole expression can be seen, but we cannot scroll. Scrolling would mean that we can keep the region window the same small size but would be able to move in the expression inside that window very much as we can do (in Prime in a very clumsy way) with large vectors and matrices.

@Werner

I am really grateful for your feedback. Your example works in MC11.

Moreover in rewriting your latter example I discovered that even your previous example (using (X, Y):=Find(x,y) etc.) would work, but it is necessary always when one assigns a variable, to follow it by the symbolic evaluation -->, like this:

fY(a,b,c,d):=Y --> (variable assignment works)

fY(a,b,c,d):=Y (variable assignment does NOT work)

@Valery

Thanks. Prime uses FrameNet, which I do not like (I am still in XP), and it is heavier in requirements than MC. Moreover it comunicates with MC just in import. So there is a lock-in effect, that makes one suspicious also for some missing features that MP initially showed.

I am happy to know from you that its symbolic engine is now as capable as in MC, ore even more. In general on this point, I would like to see a comparison chart of the strenghts and weaknesses (including features that are not still present) of MP vs MC, but made from a reliable source, not just for adv purposes. Probably a proposal would be to leave a reliable set of (power or long term) users to assign the marks. That would be a great feedback, I think, also for PCT.

but it is necessary always when one assigns a variable, to follow it by the symbolic evaluation

Its not necessary if you would evauate the newly created function symbolically only. But normally you want to eval it numerically, so you need the extra symb. eval.

The reason is:

If you create a symbolic expression, e.g.

U:=(R=U/I) solve,U -->

U is assigned a symbolic value of R*I, but U is numerically undefined and thats the reason you will see an error.

Assigning a function

u(R,I):=U

works symbolically only, because U is only defined for symbolical eval

Assigning a function like

u(R,I):=U-->

will first evalaute U symbolically (yielding R*I) and will then take this result as the function definition which is now valid for symbolic AND numeric eval.

Thanks @Werner, clear explanation!

Top Tags