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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

polar to rectangular conversion in mathcad PRIME?

KarlBogha
12-Amethyst

polar to rectangular conversion in mathcad PRIME?

HELLO ALL, I AM SHOCKED THAT PRIME 2.0 DOES NOT HAVE A POLAR TO RECTANGULAR CONVERSION, BOTH WAYS.

I HAD TIRED TO FIND A WAY OR A FUNCTION, TRIED THE DISCUSSIONS COULD NOT FIND A SOLUTION.

MY HP ENGINEERING CALCULATOR DOES CONVERSIONS FROM POLAR TORECT, AND RECT TO POLAR.

i DONT KNOW WHY THIS WAS NOT ADDRESSED BY MATHCAD.

ANYONE HAS A METHOD OF DOING THIS? THANKS.

I AM NEW IN MATHCAD AND STARTED WITH PRIME.

ITS OF NO USE IF I HAVE TO RESORT TO A CALCULATOR.

I READ A NUMBER OF POSTS GOING BACK A FEW YEARS YET NO SOLUTION. STRANGE. MAYBE INDUSTRY HAS A DEAL ON WHO CAN AND CANNOT HAVE THE CONVERSION. MEANT PRIMARILY FOR ELECT. ENG. HOPE I GET HELP ON THIS ASAP.

THANKS.

N/A.
12 REPLIES 12

Hi,

What conversion functions do you need, most should be available through the standard operators & functions.

Regards

Andy

No need to shout (uppercase)!

Whats the problem - you have a square root, a multiplication, a square, function atan2() and sin() and cos().

Whats the problem in creating the functions you are missing.

Her are two ways to do so. I chose single values as input and a column vector as output.

polrec.png

KarlBogha
12-Amethyst
(To:Werner_E)

Werner the reply you provided was helpful but it does not do the job!

I need Prime to have a function like cos(x), so that i can use it anywhere in the calculation steps.

The method you provided is helpful but is not workable on calculation sheets where we apply rect to polar, then polar to rect, and it goes on till the calcs are completed.

There is the magnitude | | and the arg (argument) functions which can be used, but to apply the conveersion finction directly means not having to associate it to a dummy variable. Too much back and forth.

Honestly it is a serious problem since Mathcad does not see this needy function.

I dont know if earlier Mathcad versions had the polar-rect conversion function.

HP calculators have it on the scientific calculators used by engineering students and engineers.

You should check into this could be Mathcad just missed out.

The solution you provided is helpful but I am sorry we need a function. Thanks.

N/A.
KarlBogha
12-Amethyst
(To:Werner_E)

OK. Werner can you make the output a row values, instead of column values for me?

This will certainly be helpful compared to where i am at now.

if the answer is in the form (20,40) it makes it easier to read and its more easily readable for my calcs.

if its a function prime had by that i mean something like Vab(polar2rect)=20,40. then the value of (20,40) is immediately assigned to Vab. thats what i need for most of my calcs.

same for rect2polar.

werner try something. thanks.

N/A.

Karl Bogha wrote:

... can you make the output a row values, instead of column values for me?

Do you mean something like this?

rectpol.PNG

Alan

i had replied on ptc community page.

N/A.

SImply use a 1x2 matrix in the function definition instead of the 2x1 I had used.

It all depends on how you would like to use those conversion functions and their results.

Usually column vectors are more convenient (just 1 index) and if its only for display purposes you could as well use the transpose operator when you evaluate and show,

But I think Alan already posted what you demanded (input and output both are row vecors).

If its for display only you may even consider using the new versor notation for complex numbers which was introduced with Prime. On the other hand you may also call it a tricky nonsense of course.

recpol.png

I just noticed that you placed this question in "Electrical Engineering" so I guess your question may be dealing with complex variables anyway!? You would need the Rec<-->Pol function for your calculation with a normal calculator, but Mathcad can deal with complex variables so you won't need any conversion function at all:

27.11.png

KarlBogha
12-Amethyst
(To:Werner_E)

Werner and Alan the replies provided by you had been helpful, I got a chance today, Sunday, to try the solutions provided by you. I started of with difficulty in this due to my group had people working with Mathcad, and I was working in Prime, and I heard this that and the other, and it led me to understand it all as the other!

I got down and tried it out and I remembered I had gone through this before partially until where i stopped.

Why is it Prime returns the answer for complex numbers in j and accepts the variable in format i?

Can I have it both ways j for elecrical engineering since its not confused with current variable i?

Meaning enter j for complex number's imaginary part?

My progress is attached. Not Over Yet since I got to do some complex calculations with these will request

further help. Thanks.

P2R+and+R2P.png

N/A.

So you are dealing with complex numbers as I guessed.

As I see it you won't need any pol2rec/rec2pol functions anyway and you may use j instead of i when assigning a variable, too - I used it that way here: http://communities.ptc.com/message/227548#227548!

Also you won't need to write new functions to get the argument in degree. As was also shown in the thread mentioned above you can use the degree sign (or type deg) for input and output as well.

When assigning an angle in degre you may either type deg after the value or type the degree symbol from the keyboard

When showing an evaluation you may either type deg in the space after the displayed value (which will be in rad by default) or you insert the dgree sign from the unit menu (typing it from the keyboard won't work on contrary to Matchcad 15 and below).

So there is no need to do the conversion as in your screenshot.

KarlBogha
12-Amethyst
(To:Werner_E)

I had replied on ptc community page.

N/A.

???

where else?

Top Tags