Circuit code in Polar format | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Circuit code in Polar format

https://code.sololearn.com/c6a17A2490a0 So I am solving a previous year's question from my university, can't share the image as solo learn has no option of sharing the image. So describing the question. There is a circuit where the impedance Z2=R2+X2 i.e a resistor and an inductor connected in series, the source voltage E2 is given(mag=450, phase angle=0 deg). There is also a load connected to it in series. Just a simple series circuit. The code takes the values of R2, X2, and ZL ie. load impedance in the real and imaginary format as user input. The output V2 and I2 will be in polar format. Tried to do it acc to https://www.cplusplus.com/reference/complex/polar/ not working

8th May 2021, 5:52 PM
Ramisa Fariha
Ramisa Fariha - avatar
3 Answers
+ 1
@Martin Thank you so much. Was my first time using this function in code. Now it's clear to me how to use it
9th May 2021, 5:24 PM
Ramisa Fariha
Ramisa Fariha - avatar
+ 1
@Martin I have done it again but still there is an error about the operator / and also warnings https://code.sololearn.com/c6a17A2490a0
10th May 2021, 3:43 PM
Ramisa Fariha
Ramisa Fariha - avatar
+ 1
@Martin Owwwwww ok Thank you....will again do it
10th May 2021, 7:48 PM
Ramisa Fariha
Ramisa Fariha - avatar