Hi everybody!
I have a assignment that needs your help.
I have to build a program using C++ to analyse a random R,L,C circuit. The circuit structure is described in a input file form, for instance, R1 para L1 para C1 ( R1 // L1 // C1), and their value. Once running program, user can enter a random circuit structure ( that's the biggest problem , i think), this program will read it . The result is currents and voltage on each element and it is save in a .txt file that can be redrawn on MATLAB.
Anyone has ideas which can help me??? Im stuck!
Thanks for your help and sorry for my bad English!
How does a person enter a "random circuit structure"?
What information should be put in a text file?
Do you already have a Matlab program that reads from a formatted text file?
We are not psychics.
I'm probably misinterpreting your question because obviously all three components would have the same voltage in parallel. Each component will, however, have a different current passing through it. I could go through it... but the parallel-circuit link above goes through finding the impedances and currents of each component in its examples. It's basically just plugging in and making sure you typed the formulas right, if you don't actually care how the equations are derived.
Based on @Ganado's circuit; numbers taken from the second example in his link.
As the others have already said, the OP must explain what he means by a "random circuit structure". It's not very exciting if all components are in parallel: they share the same voltage across their terminals.