11,482,402 members (72,821 online)
Rate this:
See more:
How I can present J into C++ programe for this equation
Z=R*(X_l+X_c )j
j wich is mean the imaginary part ( complex number )
Posted 9-Apr-13 6:15am
Edited 9-Apr-13 6:17am
v2
Sergey Alexandrovich Kryukov at 9-Apr-13 11:21am

What do you mean by "present"? Just using the arithmetic of complex numbers, or some "fancy" presentation on screen?
Traditionally, imaginary part is indicated by imaginary unit denoted "i", not "j"...
—SA
OriginalGriff at 9-Apr-13 11:26am

Not necessarily: "In the disciplines of electrical engineering and control systems engineering, the imaginary unit is often denoted by j instead of i, because i is commonly used to denote electric current in these disciplines."
Wiki: http://en.wikipedia.org/wiki/Imaginary_unit
It may be the OP is from an engineering background.
Sergey Alexandrovich Kryukov at 9-Apr-13 11:28am

I don't say necessarily, of course...
—SA
OriginalGriff at 9-Apr-13 11:38am

:)
Sergey Alexandrovich Kryukov at 9-Apr-13 13:39pm

Comment on any posts, reply to available comments, or use "Improve question" (above).
Also, keep in mind that members only get notifications on the post sent in reply to there posts.
—SA
Matt T Heffron at 9-Apr-13 13:40pm

You can't represent complex numbers with the notation you've shown.
Just like you need the * to represent multiplication (e.g., instead of "3b" for "3 times b", you must use "3*b"), you will need a different notation for complex numbers.
The link that Richard provided (Solution 1) has the documentation of a standard implementation for complex numbers in c++.
This is what you'll need to use.

Rate this:

## Solution 1

You could easily do this[^].
CPallini at 9-Apr-13 13:43pm

5.