Python Forum
Automatically generate coupled equations from given conditions
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automatically generate coupled equations from given conditions
#1
I would like you to help me create a python code that will automatically generate equations from given conditions for the given function F.



The function is given by:

F(n1,n2)=Ax(n1,n2)+Bx(n1+1,n2)+Cx(n1-1,n2)+Dx(n1,n2+1)+Ex(n1,n2-1)

for n1+n2<N (where 0<n1,n2)

and

F(n1,n2)=Ax(n1,n2)

Example

For n1+n2<=2
F(0,0)=Ax(0,0)+Bx(1,0)+Dx(0,1)
F(1,0)=Ax(1,0)+Cx(0,0)+Bx(2,0)+Dx(1,1)
F(0,1)=Ax(0,1)+Ex(0,0)+Bx(1,1)+Dx(0,2)
F(1,1)=Ax(1,1)
F(0,2)=Ax(0,2)
F(2,0)=Ax(2,0)
Reply
#2
We do not write code for others here. You are welcome to post your attempt at writing the program, and we can assist if you get errors or incorrect results.

Otherwise, if you want to hire someone to do the task for you, this thread will be moved to Jobs subforum.
Reply
#3
We don't want to see some one offering homework as a job either.
Be aware that your professor probably uses this site and will notice.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020