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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

1-Newbie

## help on using symbolic solve and vectors with units

Hi,

I'm trying to use a the symbolic solve function to rearrange an equation and solve for a variable, but I'm having trouble because the answer is a vector with units.

Example: given the area of a circle, find the radius. I enter:

A:= 3.14 cm^2

(A = pi * r^2) solve,r->

and it spits out a column vector (displayed here as a row vector)... -> (1cm, -1cm)

and I want to set that to another variable, say, R1, so I now have:

A:= 3.14 cm^2

R1:= [ (A = pi * r^2) solve,r-> (1cm, -1cm) ]

R1= (1cm, -1cm)

I know it can only be the positive value, so I want to pull that value out:

R2:= R1[0

this gives me an error: R1 is red and the hover text reads "this value must be an array"

How can I set a variable to be the positive radius? (R= 1cm)

(I know I could just rearrange the equation here for the radius in the first place, but I want to keep it clear where I got the equation from. Also, this is just a simple example and I'd want to do it with something more complicated and want to avoid an algebra mistake)

Thank you very much!

Eli

(using Mathcad, version 14.0.0.163 [build 701291152] on windows7, 64bit)

1 ACCEPTED SOLUTION

Accepted Solutions
19-Tanzanite
(To:ptc-4650249)

There's a couple of approaches

4 REPLIES 4
19-Tanzanite
(To:ptc-4650249)

There's a couple of approaches

1-Newbie
(To:RichardJ)

Hi Richard,

thank you so much for your response. That is exactly what I was looking for BUT...

when I try the same thing you're doing, whether in the same document with different variables or in a new document, I still get an error. This time it's saying that my radius variable is undefined (with both methods).

I think I must be entering it wrong, although it looks the same as yours (from what I can see).

Any thoughts on what I'm doing differently? My file is attached.

thanks!

Eli

19-Tanzanite
(To:ptc-4650249)