CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate: Re: [Laurent_R] Perl code to get a logic: Edit Log



venu
New User

Oct 30, 2014, 4:08 AM


Views: 17989
Re: [Laurent_R] Perl code to get a logic

Thanks Laurent and Bill,

I am from circuit design domain. So I don't know much perl. And Sorry for incomplete question. I will follow Laurent suggestion and I will try at my end and let you know if I struck anywhere.

Previously I failed to attach screenshot. Now I attached it. Just share If any logic strikes to you. I will write code by my self by following your suggestions or logic.

In file1 :

R1 7n 1n
R2 8n 1n
R3 1n 2n
R4 2n 3n
R5 3n 4n
R6 3n 5n
R7 3n 6n

File2 will contain currents of Resistors(I modified file2 in this post)

R1 5

R2 5

R5 -2

R6 -4

R7 -4

Need Output:

R1 5

R2 5

R3 10

R4 10

R5 -2

R6 -4

R7 -4

Please see below image. It is combination of first two files and output. Green colour one is my output. File1 will discribe R device connections and File2 will give currents in all ends.







Main logic is ::::::: Currents in all resistors branches are some of entering currents and leaving currents at any resistor terminal. I want output like this

R1 - 5 ( branch current we will directly get from file2 )

R2 - 5 ( from file 2 )

R3 - 5+5=10 because 1n is connected to R1 and R2

R4 - 10 because it is connected to R3

R5 - -2 directly get from file2

R6 - -4 directly get from file2

R7 - -4 directly get from file2



Thank you,

Venu


(This post was edited by venu on Oct 30, 2014, 5:26 AM)


Edit Log:
Post edited by venu (New User) on Oct 30, 2014, 4:10 AM
Post edited by venu (New User) on Oct 30, 2014, 4:12 AM
Post edited by venu (New User) on Oct 30, 2014, 5:26 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives