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


Messages In This Thread
Automatically generate coupled equations from given conditions - by malusigumede - Mar-14-2018, 07:53 PM

Forum Jump:

User Panel Messages

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